For additional information on referential integrity, refer to the SQL Reference . Triggers You can use triggers before or after an update to support logic that can also be performed in an application. 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.