7.4. The Information Schema

The Standards define an information schema that is supposed to be universally implemented in all SQL products. This schema provides VIEWs that are defined in terms of base tables that hold metadata about the other schémas. The only purpose of the definition schema is to provide a data model to support the information schema and to assist understanding. An implementation need do no more than simulate the existence of the definition schema, as seen through the information schema VIEWs.

We start with the INFORMATION_SCHEMA, which allows us to access these VIEWs in the same way we would access any other tables in any other schema. SELECT on all of these VIEWs is granted to PUBLIC WITH GRANT OPTION, so that they can be ...

Get Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.