Chapter 13. Showing MySQL Metadata

In previous chapters, we have moved from the basics of selecting, inserting, creating, and dropping in MySQL through Python. In this chapter, we will look at accessing MySQL's metadata through Python. We have seen a lot of this incidentally in preceding chapters. However, in this chapter, we will look at them in greater depth. By the end of this chapter, we will see the following:

  • What MySQL metadata is available to us and how to access it
  • How to get a list of databases and tables
  • Ways to switch databases on-the-fly
  • How to get columnar information

This information is very useful for creating intermediate levels of database management. At the end of the chapter, we will look at how to create a class representation ...

Get MySQL for Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.