Member-only story
Pyodbc meta-data methods you should be using — interactions with MySQL.
In my day job, I have recently begun to leverage the Python pyodbc package for MS Access related database tasks. Working with any database, it goes without saying that understanding the schema is paramount. What tables are present? What are their columns and types? How are they related? Among the many methods pyodbc provides, to answer these types of questions, it provides 3 ‘meta-data’ methods you simply cannot live without. Want to know which ones they are? Keep reading…
OS, Software, and DB used:
Self-Promotion:
If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!
I’m quite fond — and comfortable — working in a command-line environment so the examples presented in the post are carried out using ipython
, which can easily be installed via pip.
Connection handlers…
It only makes sense that to use pyodbc, it must first be imported. Also, assume for the duration of this post that I am working with the below database handlers — a.k.a connection(s) — and targeting the sakila open-source database: