|New data for the Db2 Catalog?!|
What is an empty database? How did the entries for system tables make it into the system tables? What are packed descriptors? How can I simulate small or big data sets? Is it possible to call the catalog "data dictionary" and access it in the Oracle style? How does the Db2 Catalog relate to SQL performance and data security?
Those are some of the questions I try to answer. You can see me talk about that topic at the upcoming IDUG DB2 Tech Conference in Lisbon, Portugal, or the DB2 Aktuell in Essen, Germany.
The Db2 Knowledge Center has quite many entries related to the catalog and related topics. Here are some I will talk about:
- An introduction to the catalog and its data can be found in the database reference. A table at the bottom of that page lists the common names used for objects. As an example, TABNAME and TABSCHEMA are used to provide the table name and schema across all the catalog views.
- The road map to the catalog views lists the individual views by object type.
- Many of the SQL and XML Limits are derived from the structure of the catalog tables
- Db2 stuffs its metadata into its system tables (the catalog). Over time (and Db2 versions) the catalog is extended. Thus, be sure not to use reserved schema names (and reserved words).
- If you wish, Db2 provides Oracle data dictionary-compatible views into the Db2 metadata.
- The tools db2look and db2cat directly deal with catalog data. Have you already used them?
- The security-related entry on gaining access to data through indirect means has quite some must-reads on the catalog.
If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik).