|Table Designer||Table Designer|
Supplementary parameters for the specified column are set in this tab on the table designer. Various items appear on this tab according to the column type:
For CLOB or CHAR columns:
For TIMESTAMP or TIME columns:
For NUMERIC columns:
For columns whose type is defined by a domain:
For all columns:
The items on this tab allow the creation and modification of more complicated indexes than the simple indexes that can be defined for one column directly.
Index name: Each index should have a unique name according to the SQL standard. If you do not specify a name, the default name `INDEXn` will be used.
Index type: Primary Key, Unique or Non-unique .
Index definition: A general expression defining the index. Usually only a name of one or more columns with the DESC clause for reverse sorting (e.g. column1,column2 DESC).
NULL? - Defines if the index can contain NULL values. For more information about the NULL and indexes, see Using indexes.
You can create a new index by entering the name and definition on a free row in the grid and then press Enter. You can remove an index with the Drop index button. If you add a new index to the table or change an existing index, there will be a delay when you save this table due to reindexing.
This tab allows the creation and modification of integrity constraints.
Check name: Each constraint must have a unique name according to the SQL standard. If you do not specify a name, the default name `CHECKn` will be used.
Check condition: Constraint definition, such ase date_input>=CURRENT_DATE.
Deferred?: Set whether the constraint violation should take effect immediately (FALSE) or on commit (TRUE) (see details here).
A new constraint will be created if you set at least the name and definition of the constraint in the grid and press Enter. The constraint can be removed using the Drop check button.
This tab allows the creation and modification of referential integrity rules for a table. Referential integrity (RI) is defined always in the child table (or in a diagram).
Name: Each RI must have a unique name according to the SQL standard. If you do not specify a name, the default name `FOREIGN_KEYn` will be used.
Local column(s): The column (one or more) from the table being edited that compose the RI key. The box allows only the columns that are indexed.
Remote table: Parent table.
Remote column(s): Column (one or more) from the parent table that compose the RI foreign key. The box allows only the columns that have unique indexes.
ON UPDATE: The rule that describes what should happen with the value in the child table when the foreign key value in the parent table is modified.
ON DELETE: The rule that describes what should happen with the value in the child table when the record in the parent table is deleted. The following possibilities are available:
|Rollback||The action that violates the referential integrity is rolled back.|
|Set NULL||NULL values are inserted in the child table record columns that connect the child record with the parent record.|
|Set default||DEFAULT values (from the table definition) are inserted in the child table record columns that connect the child record with the parent record.|
|Cascade update||A modification in the parent table is made in the keys of the child records as well (in the child table).|
|Cascade delete||All connected child records are deleted when a parent record is deleted.|
Deferred?: Set whether the RI violation should take effect immediately (FALSE) or on commit (TRUE) (details here).
You can create a new RI rule if you set at least the first four columns and press Enter. You can remove a RI rule with the Drop foreign key button. It is much simpler to define RI rules in a diagram.
This tab allows you to add additional information for individual columns. This information is used when the table is opened in the grid from the Control Panel. This information is stored in the table definition as a comment.
Caption: Text that is used in the grid column caption.
Help text: Text that is used as help in the status bar or a tooltip when selecting an item in the grid.
Show help text in a tooltip: A switch between displaying help in a tooltip or the status bar.
Another group of items is accessible for data types using a combo boxes for entering values.
Query returning the choice: Name of the fixed query in the same application (or direct SELECT) used to fill the combo box that appears. The query must contain the columns specified below.
Column with value: Name of the column from the previous query that contain the values that are shown in combo box.
Column with value description: Name of the column from the previous query that contains the actual values (only for types that require a translated combo box).
This tab describes a rule that determines how and from where values are moved into a column that was created or modified.
The default conversion: description: The original contents of the columns are moved. This option is allowed when a column is modified and the default (implicit) conversion CAN be performed (e.g. SMALLINT to INT, CHAR(n) to CLOB etc.).
The default value for this column (NULL if not specified): The original value is not used. The column will be assigned the DEFAULT value or NULL. This option is presented when a new column is inserted or implicit conversion CANNOT be performed.
The value of the expression specified below: Enter the expression in the Value of the column field that describes what should be moved into the modified or created column. You may use references to table columns (before modification) listed below in the expression.
|Table Designer||Table Designer|