MySQL database schema discovery

R

Roy Smith

What are my options for MySQL schema discovery? I want to be able to
find all the tables in a database, and discover the names and types of
each column (i.e. the standard schema discovery stuff).

PEP 249 doesn't seem to have any discovery methods. Nor does MySQLdb
appear to have any non-standard extentions for this. I could probably
do this with SQLAlchemy, but I'm trying to avoid that because it's so
heavyweight.

Is there anything else I should be considering?
 
T

Tim Golden

What are my options for MySQL schema discovery? I want to be able to
find all the tables in a database, and discover the names and types of
each column (i.e. the standard schema discovery stuff).

PEP 249 doesn't seem to have any discovery methods. Nor does MySQLdb
appear to have any non-standard extentions for this. I could probably
do this with SQLAlchemy, but I'm trying to avoid that because it's so
heavyweight.

MySQL appears to support the standard(ish) INFORMATION_SCHEMA schema:

http://dev.mysql.com/doc/refman/5.0/en/information-schema.html

TJG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top