Download SELCOPYi Reference and User Guide
Transcript
DB2 Utilities Referential Constraint Definitions - Panel Fields Referential Constraint Definitions - Panel Fields Field names that follow are as appear in the zoomed view of a table row. Names in parentheses correspond to the equivalent column name in table view. Table Owner: A non-enterable field displaying the new table owner id as supplied in the Table Name & Location panel view. Name: A non-enterable field displaying the new table name as supplied in the Table Name & Location panel view. Sel> (Sel) Enter "/" (slash) or any non-blank character in this field to include (select) the referential constraint definition in the create table syntax. A blank in this field will exclude (deselect) the constraint definition. Deselecting a constraint definition in table view has the same effect as executing the table primary command EXCLUDE (or line command "X") to exclude the table row. Constraint Name Optionally specifies the name of the referential constraint which is automatically upper cased. If not specified, DB2 will generate a unique name for the constraint. A constraint name has a maximum length of 128 characters. Action> 1. Select Parent Key Columns (Parent Key Columns) In zoomed view, enter "1" in the Action> field and press <Enter> to display the Referential Constraint - Parent Key Columns sub-panel for this referential constraint definition. In table view, the number of selected parent key columns is displayed. Position the cursor on the Parent Key Columns entry of the required table row and press <Enter> or, if configured, double-click the left mouse button to dispaly the sub-panel. Corresponds to SQL CREATE TABLE syntax REFERENCES table-name (column-name, ..) . Action> 2. Select Foreign Key Columns (Foreign Key Columns) In zoomed view, enter "2" in the Action> field and press <Enter> to display the Referential Constraint - Foreign Key Columns sub-panel for this referential constraint definition. In table view, the number of selected foreign key columns is displayed. This number should match the number of selected parent key columns. Position the cursor on the Foreign Key Columns entry of the required table row and press <Enter> or, if configured, double-click the left mouse button to dispaly the sub-panel. Corresponds to SQL CREATE TABLE syntax FOREIGN KEY (column-name, ..) . Action on DELETE of Parent Table row: (Delete Action) Select the action performed on delete of a row in the parent table which has a referential constraint relationship with a row in the new DB2 table (i.e. delete rule). In table view, enter a blank or invalid value in this field to display a scrollable list of valid, selectable entries for this field. In zoomed view, enter "/" (slash) or any non-blank character to select one of the mutually exclusive options. 1. Action defined by CURRENT RULES special register. (Default) The default action if no explicit delete rule is defined. 2. Delete fails if dependent row exists - check performed immediately. (RESTRICT) Corresponds to SQL CREATE TABLE syntax ON DELETE RESTRICT. 3. Delete fails if dependent row exists - check performed at end of DELETE. (NOACT) Corresponds to SQL CREATE TABLE syntax ON DELETE NO ACTION. 4. Dependent rows are deleted. (CASCADE) Corresponds to SQL CREATE TABLE syntax ON DELETE CASCADE. 5. Nullable columns in the foreign key are set to NULL. (SETNULL) Corresponds to SQL CREATE TABLE syntax ON DELETE SET NULL. DB2 Enforced Constraint: (Enf) Select whether or not the referential constraint is to be enforced by DB2 during normal operations, such as insert, update, or delete. 2013-11-13 13:06:41 SELCOPY/i Reference and User Guide 343
Related documents
SELCOPY/i Reference and User Guide
CBL Interactive (CBLi)
SELCOPY Manual
sevenstaxSOAP/XML/HTTP User Manual
SELCOPYi Training Manual
SELCOPY C++ Version (SLC) 3.10 New Features
Appendix 8 of the NDSR User Manual
Structured Data Environment Manual
Model 6400EH - Teledyne Analytical Instruments
Hierarchical nominal terms and their theory of rewriting
CBLVCAT Manual
Structured Data Environment (SDE)