Catalog integrity

Catalogs contain information about tables, views, SQL packages, sequences, indexes, procedures, functions, triggers, and parameters in a schema.

The database manager ensures that the information in the catalog is accurate at all times. This is accomplished by preventing end users from explicitly changing any information in the catalog and by implicitly maintaining the information in the catalog when changes occur to the tables, views, SQL packages, sequences, indexes, types, procedures, functions, triggers, and parameters described in the catalog.

The integrity of the catalog is maintained whether objects in the schema are changed by SQL statements, i5/OS™ CL commands, System/38™ Environment CL commands, System/36™ Environment functions, or any other product or utility on an iSeries™ system. For example, deleting a table can be done by running an SQL DROP statement, issuing an i5/OS DLTF CL command, issuing a System/38 DLTF CL command or entering option 4 on a WRKF or WRKOBJ display. Regardless of the interface used to delete the table, the database manager will remove the description of the table from the catalog at the time the delete is performed. The following is a list of functions and the associated effect on the catalog:

Table 1. Effect of Various Functions on Catalogs
Function Effect on the Catalog
Add constraint to table Information added to catalog
Remove of constraint from table Related information removed from catalog
Create object into schema Information added to catalog
Delete of object from schema Related information removed from catalog
Restore of object into schema Information added to catalog
Change of object long comment Comment updated in catalog
Change of object label (text) Label updated in catalog
Change of object owner Owner updated in catalog
Move of object from a schema Related information removed from catalog
Move of object into schema Information added to catalog
Rename of object Name of object updated in catalog