Previous Topic: Methods to Override Trigger TemplatesNext Topic: Create an RI Type Override Trigger Template


RI Type Override Templates

You can use an RI Type Override template to change the behavior of the built-in template for an RI Trigger Type. For example, when you delete a row in the parent CUST_ORDER table, you want to use the default Parent-Delete CASCADE trigger code to delete the associated child rows in the ORDER_LINE table. In addition, you want to capture the deleted information and insert the deleted rows into a historical archive table any time a Parent-Delete CASCADE is performed, so you can retrieve the information at a later date.

One way to capture the behavior is to change the built-in Parent-Delete CASCADE trigger to perform the archiving by creating an RI Type Override. Here are some reasons why you might want to use an RI Type Override to change default trigger behavior:

Creating an RI Type Override template makes it easy to produce custom referential integrity triggers because all relationships that are assigned the overridden RI trigger type automatically use that template.

Note: An RI Type Override template changes the behavior of all the attached triggers in a model.