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
):
Internally, phpMyAdmin can call the information_schema
, instead of the corresponding SHOW
statements to retrieve metadata. This behavior...