Using the catalog in database design

Retrieving information from the catalog by using SQL statements, can be helpful in designing your relational database.

Begin general-use programming interface information.

For a list of Db2 catalog tables and descriptions of the information that they contain, see Db2 catalog tables.

The information in the catalog is vital to normal Db2 operation. You can retrieve catalog information, but changing it can have serious consequences. Therefore you cannot execute insert or delete operations that affect the catalog, and only a limited number of columns exist that you can update. Exceptions to these restrictions are the SYSIBM.SYSSTRINGS, SYSIBM.SYSCOLDIST, and SYSIBM.SYSCOLDISTSTATS catalog tables, into which you can insert rows and proceed to update and delete rows.

To retrieve information from the catalog, you need at least the SELECT privilege on the appropriate catalog tables.

Note: Some catalog queries can result in long table space scans.

End general-use programming interface information.