PowerDesigner trigger templates and template items allow you to create triggers in a modular reusable fashion.
PowerDesigner provides certain basic trigger templates for those databases that support them, which create triggers to implement referential integrity between tables. Trigger templates exist for each type of trigger supported by the DBMS, each identifying:
-
A time relevant to an event (either before or after)
-
An event that can occur to a table row (either Delete, Insert, or Update)
-
The code that performs the trigger action, and which may contain references to trigger template items, which are re-usable blocks of script.
You can modify the code of these pre-defined templates, but they cannot be deleted or renamed:
Insert Templates
Template type
|
Generates trigger/procedure executing...
|
InsertTrigger
|
With insert
|
BeforeInsertTrigger
|
Before insert
|
AfterInsertTrigger
|
After insert
|
InsertProc
|
When called by InsertTrigger
|
BeforeInsertProc
|
When called by BeforeInsertTrigger
|
AfterInsertProc
|
When called by AfterInsertTrigger
|
Update Templates
Template type
|
Generates trigger/procedure executing...
|
UpdateTrigger
|
With update
|
BeforeUpdateTrigger
|
Before update
|
AfterUpdateTrigger
|
After update
|
UpdateProc
|
When called by UpdateTrigger
|
BeforeUpdateProc
|
When called by BeforeUpdateTrigger
|
AfterUpdateProc
|
When called by AfterUpdateTrigger
|
Delete Templates
Template type
|
Generates trigger/procedure executing...
|
DeleteTrigger
|
With delete
|
BeforeDeleteTrigger
|
Before delete
|
AfterDeleteTrigger
|
After delete
|
DeleteProc
|
When called by DeleteTrigger
|
BeforeDeleteProc
|
When called by BeforeDeleteTrigger
|
AfterDeleteProc
|
When called by AfterDeleteTrigger
|