If the rules or operations supported by the triggers apply for all applications that use the data, then triggers centralize the rules or operations in the database, making it generally applicable and easier to maintain. For additional information on triggers, see Using Triggers in an Active DBMS and refer to the SQL Reference . Using Triggers Before an Update Using triggers that run before an update or insert, values that are being updated or inserted can be modified before the database is actually modified. Triggers can update, insert, or delete data in the same or other tables. This is useful to maintain relationships between data or to keep audit trail information.
Triggers can check data against values of data in the rest of the table or in other tables.
This is useful when you cannot use RI constraints or check constraints because of references to data from other rows from this or other tables. This is useful, for example, for issuing alerts or updating information outside the database. You may decide to write code to enforce rules or perform related operations in the application instead of the database. You must do this for cases where you cannot generally apply the rules to the database. You may also choose to place the logic in the application when you do not have control over the definitions of the data in the database or you believe the application logic can handle the rules or operations more efficiently.