Create Table -- Fields and controls

Table page
Columns page
Primary Key page
Partitioning Key page
Foreign Keys page
Check Constraint page



Table page

" " Table schema
" " Table name
" " Table space
" " Index table space
" " Long data table space
" " Comment
" " Data capture for propagation
" " For partitioned database environments only. Duplicate table data on each database partition
" " OK
" " Show SQL
" " Cancel

" " Table schema

Use this box to specify the schema of the table that you're creating. The initial value in this box is the user ID under which you connected to the database. To specify a schema with a name that's different than this ID, use one of these methods:

" " Table name

Type a name for the table that you're creating. This name:

Attention: This name must be unique within the table's schema. No other object in the schema can have the same name as the table.

" " Table space

Optional: Use this box to specify the table space in which to create the table. To select a table space:

If you do not specify a table space, either:

You must specify a REGULAR DMS table space other than the default table space if you plan to specify a specific index table space or long data table space.

" " Index table space

Optional: Use this box to specify a table space in which to create any indexes on the table. Indexes can be stored in a different table space than the table itself. You might want to specify an index table space to improve performance for very large tables.

To select a table space in which to create indexes:

This field is available only if you specified a table space other than the default in the Table space box. If you do not specify an index table space, the indexes will be created in the same table space as the table.

" " Long data table space

Optional: Use this box to specify the table space in which to store the values of any long columns. Long data can be LONG VARCHAR, LONG VARGRAPHIC, LOB data types, or distinct types with any of these as source types.

To select a table space for values of long columns:

This field is available only if you specified a table space other than the default in the Table space box. If you do not specify a long data table space, the long data will be created in the same table space as the table.

" " Comment

Optional: Type a comment to document the table that you're creating. You can type up to 254 characters, including embedded blanks.

" " Data capture for propagation

Select this check box to indicate that extra information regarding SQL changes to this table be written to the log. This extra information is required if this table will be replicated. This check box must be selected if you plan to use this table as a source for replication.

" " For partitioned database environments only. Duplicate table data on each database partition

Select this check box to duplicate all of the data for the table on each database partition of the nodegroup of the table. When defining a duplicate table, the partitioning key cannot be specified.

Duplicating table data on each database partition may improve performance in situations where collocation is not possible.



Columns page

" " Columns
" " Add
" " Change
" " Remove
" " Select
" " Move Up
" " Move Down
" " OK
" " Show SQL
" " Cancel

" " Columns

This box contains a list of all of the columns defined for the table that you're creating. Use this box to view your column definitions or to select a column that you want to change, remove, or reorder. You can select a new column to change any field, remove the new column from the table, or reorder the new column among the other new columns. Click on Add to add a column to this list.

" " Add

Click on this push button to open the Add Column window so you can add a new column to the table that you're creating.

You can add up to 500 columns to your table. The sum of the byte counts of the columns must not be greater than 4005.

" " Change

Click on this push button to open the Change Column window so that you can change an attribute of the column that is selected in the Columns box.

" " Remove

Click on this push button to remove from the box the column that is selected in the Columns box.

" " Select

Click on this push button to open the Select Columns window so that you can select a predefined column to add to the table that you're creating.

" " Up

Click on this push button to move the column that is selected in the Columns box up one position.

" " Down

Click on this push button to move the column that is selected in the Columns box down one position.



Primary Key page

" " Available columns
" " >, >>, <, <<
" " Primary key columns
" " Constraint name
" " OK
" " Show SQL
" " Cancel

" " Available columns

This box lists all of the columns defined for the table that are not currently defined as primary key columns. Use this box to select the column or columns that you want to define as primary key columns and then click on the > push button. You can select one or more columns at the same time.

You can define up to 16 columns to be primary key columns. The sum of their length attributes must not exceed 255 bytes.

Attention: You cannot define columns of data type LOB, LONG VARCHAR, or LONG VARGRAPHIC to be primary key columns.

" " >, >>, <, <<

Use these push buttons to change the list of columns displayed in the Available columns and Primary key columns boxes. You can use:

>
To move the selected columns in the Available columns box to the Primary key columns box.

>>
To move all columns displayed in the Available columns box to the Primary key columns box.

<
To move the selected columns in the Primary key columns box to the Available columns box.

<<
To move all columns displayed in the Primary key columns box to the Available columns box.

" " Primary key columns

This box lists all of the columns defined as primary key columns. The order of the columns in this list is significant because the database manager uses the primary key for efficient access to table data.

Use this box to view the list of primary key columns or to select a column or columns to remove from the list with the < push button.

To add a column to this list, select a column from the Available columns box and then click on the > push button.

" " Constraint name

Optional: Type a name for the constraint that you're defining. This name:

If you do not specify a constraint name, one is generated for you.



Partitioning Key page

" " Available columns
" " >, >>, <, <<
" " Partitioning key columns
" " OK
" " Show SQL
" " Cancel

" " Available columns

This box lists all of the columns defined for the table that are not currently defined as partitioning key columns. Use this box to select the columns that you want to define as partitioning key columns and then click on the > push button.

Attention: You cannot define columns of data type LOB, LONG VARCHAR, or LONG VARGRAPHIC to be partitioning key columns.

" " >, >>, <, <<

Use these push buttons to change the list of columns displayed in the Available columns and Partitioning key columns boxes. You can use:

>
To move the selected columns in the Available columns box to the Partitioning key columns box.

>>
To move all columns displayed in the Available columns box to the Partitioning key columns box.

<
To move the selected columns in the Partitioning key columns box to the Available columns box.

<<
To move all columns displayed in the Partitioning key columns box to the Available columns box.

" " Partitioning key columns

This box lists all of the columns defined as partitioning key columns. The order of the columns in this list is significant because the database manager uses the partitioning key for efficient access to table data.

Use this box to view the list of partitioning key columns or to select columns that you want to remove from the list with the < push button.

To add a column to this list, select a column from the Available columns box and then click on the > push button.



Foreign Keys page

" " Foreign keys
" " Add
" " Change
" " Remove
" " OK
" " Show SQL
" " Cancel

" " Foreign keys

This box contains a listing of all of the foreign keys defined for the table that you're creating. Use this box to view your foreign key definitions or to select a foreign key that you want to change or remove. Click on Add to add a foreign key to this list.

" " Add

Click on this push button to open the Add Foreign Key window so that you can add a new foreign key to the table that you're creating.

" " Change

Click on this push button to open the Change Foreign Key window so that you can change an attribute of the foreign key that is selected in the Foreign Keys box.

" " Remove

Click on this push button to remove from the box the foreign key that is selected in the Foreign Keys box.



Check Constraints page

" " Check constraints
" " Add
" " Change
" " Remove
" " OK
" " Show SQL
" " Cancel

" " Check constraints

This box lists all of the check constraints defined for the table that you're creating. Use this box to view your check constraint definitions or to select a check constraint that you want to change or remove. Click on Add to add a check constraint to this list.

" " Add

Click on this push button to open the Add Check Constraint window so that you can add a new check constraint to the table that you're creating.

" " Change

Click on this push button to open the Change Check Constraint window so that you can change an attribute of the check constraint that is selected in the Check constraints box.

" " Remove

Click on this push button to remove from the box the check constraint that is selected in the Check constraints box.