Using information_schema

In the SQL:2003 Standard, access to the data dictionary (or database metadata) is provided by a structure called information_schema. As this is part of the Standard, and already exists in other database systems, the decision to implement this feature into MySQL was a very good one.

Note

MySQL has added some information that is not part of the standard, for example, INFORMATION_SCHEMA.COLUMNS.COLUMN_TYPE. Be aware of the fact that if you use this information in a software project, it might not be portable to other SQL implementations.

A phpMyAdmin user sees the information_schema as a normal database containing views. These views describe many aspects of the structure of the databases hosted on this server. The following screenshot shows a subset of what can be seen (and in fact, the only possible operation on this database is SELECT):

Using information_schema

Internally, phpMyAdmin can call the information_schema, instead of the corresponding SHOW statements to retrieve metadata. This behavior is controlled by the $cfg['Servers'][$i]['DisableIS'] directive. Some SELECT operations involving a WHERE clause on information_schema are really slow (many minutes of wait time) when the server hosts hundreds of databases or tables, and this is yet to be fixed by the MySQL team; this is why this directive is set to true by default, thus avoiding the use of information_schema.

The $cfg['Servers'][$i]['hide_db'] parameter can be used to hide this "database" to users who might be confused by the sudden appearance of a database that they know nothing about. It will probably depend on their level of expertise in MySQL. On a multi-user installation of phpMyAdmin, we cannot please everyone about this parameter's value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.239.118