"Me Too" MySQL Information Schema popquiz
A few days ago, I wrote how I will be your guide to the Grand Tour of the Information Schema and its Applications which is one of the two talks I will be doing at the upcoming MySQL User's Conference.
In view of the popularity of "Pop Quiz" format so successfully used by Carsten, I feel compelled to imitation, and as a primer to my talk, I'd like to offer you my "Me Too" MySQL Information Schema popquiz. So, here goes...
The MySQLinformation_schemacontains a number of tables. Among them, one is calledTABLE_CONSTRAINTS. Unsurprisingly, each row inTABLE_CONSTRAINTStable represents a single table constraint. TheTABLE_CONSTRAINTStable has the following columns:
+--------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+--------------+------+-----+---------+-------+
| CONSTRAINT_CATALOG | varchar(512) | YES | | NULL | |
| CONSTRAINT_SCHEMA | varchar(64) | NO | | | |
| CONSTRAINT_NAME | varchar(64) | NO | | | |
| TABLE_SCHEMA | varchar(64) | NO | | | |
| TABLE_NAME | varchar(64) | NO | | | |
| CONSTRAINT_TYPE | varchar(64) | NO | | | |
+--------------------+--------------+------+-----+---------+-------+
- Specify a minimal set of columns of the
information_schema.TABLE_CONSTRAINTStable that is sufficient to reliably identify a single row in theinformation_schema.TABLE_CONSTRAINTStable.- Argue why these columns are necessary and sufficient to identify a row, and why a smaller set of columns does not exist
Feel free to post the answer as a comment. Every correct answer will earn a 20% discount to the admission fee. You can get bonus points for nice elegant argumentation, and also if you specify more than one minimal set of columns.
I will elect three to five of the best answers and make sure that whoever posts it gets a laminated printout of the diagram of the MySQL information schema.
(Please make sure you post me your email address if you think you are eligible to either the discount code, the laminated diagram or both)
Labels: information_schema, information_schema.TABLE_CONSTRAINTS, MySQL, MySQL UC

