Implementing Referential Integrity with Triggers

You can create triggers for referential integrity individually or instruct PowerDesigner to create them by default.

Note: To instruct PowerDesigner to implement referential integrity between tables using triggers by default, select Tools > Model Options, click Model Settings > Reference in the Category list, select Trigger in the Default implementation list, and then click OK.

You can implement referential integrity between two tables by a trigger manually as follows:

  1. Create a reference between two tables, and then double click the reference symbol to open its property sheet.
  2. Click the Integrity tab, and then select Trigger from the Implementation list.
  3. Specify the form of Update and Delete constraints using the radio buttons (see Reference Properties), and then click OK to return to the diagram.
  4. If you have set the Automatically rebuild triggers model option, then triggers will have been created automatically in the parent and child tables. To verify this open the table property sheet and click the Triggers tab. If the triggers are not present, you will need to rebuild your triggers manually (see Rebuilding Triggers).