Previous Topic: Generate Default Triggers for a ModelNext Topic: Change the Template that is Attached to an RI Trigger


Trigger Defaults for Relationships

Default referential integrity (RI) rules and triggers are applied to each relationship in the physical model. You can specify which default trigger is applied to a relationship for all relationships in a model.

When you specify properties of a model, you can set the default RI action that you want to associate with each type of relationship in a model. You can do this either for an individual relationship or select a different RI action for an individual relationship in a model.

If the default triggers do not fully implement all of the business rules that you want to apply to a specific table, relationship, or RI action (such as Parent-Delete CASCADE), you can customize the SQL code in a CA ERwin Data Modeler trigger by changing the default RI trigger or by creating a table override trigger template.

Note: In CA ERwin Data Modeler version r7.3 and later, you can select to treat ERwin-generated triggers as model objects. In earlier versions of the product, referential integrity information for ERwin-generated triggers was generated as a comment in the body of the trigger. This mechanism stripped out ERwin-generated triggers and parsed the referential integrity constraints during a "round trip" of the data model. A "round trip" occurs when you forward engineer a model to a database or script, then reverse engineer that database or script back to the model. You can now select to both forward-engineer and reverse-engineer ERwin-generated triggers.

More information:

Methods to Override Trigger Templates

Set Default Referential Integrity Rules

Create ERwin-Generated Triggers As Model Objects