The database manager creates and maintains two sets of system catalog views. This appendix contains a description of each system catalog view, including column names and data types. All the system catalog views are created when a database is created with the CREATE DATABASE command. The catalog views cannot be explicitly created or dropped. The system catalog views are updated during normal operation in response to SQL data definition statements, environment routines, and certain utilities. Data in the system catalog views is available through normal SQL query facilities. The system catalog views cannot be modified using normal SQL data manipulation commands with the exception of some specific updatable catalog views.
The catalog views are supported in addition to the catalog base tables from Version 1. The views are within the SYSCAT schema and SELECT privilege on all views is granted to PUBLIC by default. Application programs should be written to these views rather than the base catalog tables. (5) A second set of views formed from a subset of those within the SYSCAT schema, contain statistical information used by the optimizer. The views within the SYSSTAT schema contain some updatable columns.
The catalog views are designed to use more consistent conventions than the underlying catalog base tables. Columns have consistent names based on the type of objects that they describe:
Objects associated with typed tables (columns, indexes, ...) that are part of a hierarchy appear in the SYSCAT and SYSSTAT views only at the level they are introduced, not for every subtable in the hierarchy.
(5) Most existing applications using the base tables, however, will continue to run.
[ DB2 List of Books | Search the DB2 Books ]