More about creating objects


In this section, you were introduced to the table editing windows where you created a new table definition by changing the attributes of an existing definition. Also, you used index editing windows that had the same purpose for indexes.

Each Db2 object has similar editing windows that can be opened for existing objects. Regardless of the object type, an object editing window (or windows) can be opened with the CR row command.

Creating an object like an owning object

With the CR command, the basic attributes are acquired from a like object. To acquire basic attributes from an owning object, File-AID for Db2 Object Administration has the following commands:

CRAL

Create an alias with basic attributes acquired from the owning object. This is both a primary command and a row command. Valid for tables and views.

CRCT

Create a clone table (table type ‘C’) for the selected base table. This is a row command. Valid in table lists. By default, File-AID for Db2 Object Administration uses the base table name and adds the _CT suffix to name the new clone table.

CRHT

Create a history table (table type ‘H’) for the selected temporal base table. This is a row command. Valid in table lists. By default, File-AID for Db2 Object Administration uses the temporal base table name and adds the _HT suffix to name the new history table.

CRIX

Create an index with basic attributes acquired from the owning table. This is a row command. Valid for tables.

CRMASK

Create a column mask object (access control rule). This is a row command. Valid in table column lists.

CRMQ

Create an Materialized Query Table with basic attributes acquired from the owning table. This is a row command. Valid for tables.

CRPERM

Create a row permission object (access control rule). This is a row command. Valid in table lists.

CRSY

Create a synonym with basic attributes acquired from the owning table. This is both a primary command and a row command. Valid for tables and views.

CRTB

Create a table with basic attributes acquired from the owning tablespace or database. This is a row command. Valid for tablespaces.

CRTR

Create a trigger with basic attributes acquired from the owning table. This is a row command. Valid for tables.

CRTS

Create a tablespace with basic attributes acquired from the owning database. This is a row command. Valid for databases.

CRVW

Create a view with basic attributes acquired from the owning object. This is both a primary and a row command. Valid for tables.

CRXO

Creates auxiliary objects for large objects. This is a row command. Valid for columns and tables.

CREATE menu selection

Each catalog display facility has a CREATE selection. When CREATE is selected, File-AID for Db2 Object Administration opens windows in which you can define a new object without attributes acquired from another object.

Creating a joined view

The CRVW primary command opens windows to create a view that is a join of two tables or more. CRVW is valid in table object windows.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*