"Mark A" <no****@nowhere.comwrote in message
news:26******************************@comcast.com. ..
"John Smith" <jo********@microsoft.comwrote in message
news:_O********************@news.siol.net...
>>
I'm taking this exam on Wensday. There is one question I don't understand
from test (online) exam:
For which objects (Table, View, Index...) SQL source (DDL) is held in
system catalog and for which objects isn't?
The View DDL is in the catalog. For the others, the information about
columns, etc are in the various catalog tables.
In other words, the DDL for CREATE VIEW is stored explicitly in the DB2
Catalog.
For other objects, the DDL is not stored explicitly but the detailed
description of the object is found in the appropriate tables of the catalog.
For instance, if you look at SYSIBM.SYSTABLES, you will find all of the
attributes of every table in your database; each attribute is stored in a
separate column. Therefore, the exact DDL that was used to create these
objects is not kept but all of the information is available by reading the
catalog tables and views.
Since the real DDL is more convenient in some cases than the catalog
definitions, many DBAs store all DDL that get executed. In most shops, the
DBAs create all of the higher-level objects and use scripts to create the
objects. They keep the scripts after they have been executed. Then they have
both the original script, which shows the real DDL, and can get all of the
details from the catalog as well.
--
Rhino