Previous Topic: Set Default Null Options, Data Types, Styles, and Object Owners

Next Topic: Specify History Options for Model Objects and Events

Set Default Referential Integrity Rules

Use the grid in the RI Defaults tab of the Model Editor to specify default referential integrity rules for relationships in your model.

To set default referential integrity rules

  1. Click Model Properties on the Model menu.

    The Model Editor opens.

    Model Editor RI Defaults Tab--Action Column and Relationship Type Columns

  2. Click the RI Defaults tab and work with the following options:
    Model Editor_RI Defaults Tab_Rebind RI Settings button Rebind referential integrity settings on all relationships

    Applies the new default settings to any existing relationship in the model. If you are working with an existing model and change the default settings, you can use this button to implement the new settings in the model for all existing relationships. If you save the new settings but do not rebind, the defaults affect new relationships only.

    Model Editor_RI Defaults Tab_Reset RI Default Settings button Reset all Referential Integrity default settings to their original values

    Clears your settings and returns to the system defaults.

    Automatically Create RI Triggers

    Specifies whether or not you want CA ERwin Data Modeler to automatically create triggers for the referential integrity defaults.

    Action

    Lists a SQL action in each of its rows. For each SQL action, select the default RI action for each of the following relationship type columns:

    Identifying

    Lets you specify the RI setting for each of the SQL actions in the Action column, which applies to all identifying relationships in the model. Available RI settings are None, No Action, Restrict, and Cascade.

    Non-identifying, Nulls Allowed

    Lets you specify the RI setting for each of the SQL actions in the Action column, which applies to all non-identifying relationships in the model for which nulls are allowed. Available RI settings are None, No Action, Restrict, Cascade, Set Null, and Set Default.

    Non-identifying, No Nulls

    Lets you specify the RI setting for each of the SQL actions in the Action column, which applies to all non-identifying relationships in the model for which nulls are not allowed. Available RI settings are None, No Action, Restrict, Cascade, and Set Default.

    Subtype

    Lets you specify the RI setting for each of the SQL actions in the Action column, which applies to all subtype relationships in the model. Available RI settings are None, No Action, Restrict, and Cascade.

    Note: Some target databases, such as Oracle, utilize different terminology for RI trigger actions. Use the RI setting appropriate for your target database. In the case of NONE and NO ACTION, use of NONE means no restrictions (no RI trigger is created). NO ACTION is identical to RESTRICT, which means the action is not allowed if conditions are not met.

  3. Click Close.

    Default referential integrity rules are set and the Model Editor closes.

More information:

Referential Integrity to Enforce Business Rules