« MySQL Adds Federated Storage Engine | Main | It's Official . . . I have a Woodpile »

January 29, 2005

INFORMATION_SCHEMA in MySQL

I don't know how I missed this. MySQL 5.0.2 contains a completely new way to get information about the database from the database, using select statements on the tables in the information_schema database.

For those of us that have been on MySQL for a long time, we've gotten used to the show command, and it's limited output. The information_schema database aims to be a more consistant method to get at a lot more information about what's going on in the database. Don't be scared, MySQL has decided to leave the show command intact since there are many of us who use them. In fact, to help us existing folks, MySQL 5.0.3 will have a path from the show command to the information_schema tables with:

SHOW TABLES FROM INFORMATION_SCHEMA;
Gee, that's pretty slick.

For those of you who've been on another database, this is going to make managing MySQL a bit easier, specifically SQLServer folks should feel right at home as SQLServer 2000 used the same standard that MySQL is working toward (SQL:2003).

My favorite line in the documentation about why a new metadata retrieval method:

Migration is easier because every other DBMS does it this way.
Every other? Do I sense some humor there?

Good for MySQL to be active in making the move easier for others, but also providing the existing users a standards-based method for getting at the meta data. It makes us feel a little less odd when the syntax we use is not jibberish to other vendor database administrators.

Posted by mike at January 29, 2005 1:40 PM