Show TOC

Triggers (PDM)Locate this document in the navigation structure

A trigger is a segment of SQL code associated with a table or a view, which is invoked automatically whenever there is an attempt to modify data in the associated table or view with an insert, delete, or update command. A DBMS trigger is not associated with any table or view, and fires on modifications to the database structure itself, such as the creation or dropping of a table or events like startup, shutdown, login etc. You can use triggers to enforce referential integrity (where declarative constraints are not sufficient) and to implement sequences for columns.

In the PowerDesigner interface, table and view triggers are called simply triggers, while DDL or database triggers are called DBMS triggers. View and DBMS triggers are not supported by all DBMSs.

PowerDesigner provides trigger templates to generate triggers (see Trigger Templates) and template items, which are reusable blocks of SQL script that can be inserted into triggers or trigger templates (see Trigger Template Items) and you can modify these templates and items and create your own.