Trigger Usage

A trigger is an expression that is bound to a database table and is invoked when any of the table records are modified by one of the data modification commands specified in the trigger. You can use triggers to perform operations that a database application requires when modifying data. The following list contains example tasks that you can perform with triggers:

  • Log database modifications.

  • Enforce referential integrity.

  • Create an automatic reorder for a product that is low on stock.

Triggers are created and stored as properties for a specific table. If you remove a table from a database, the triggers associated with that table are deleted. Triggers fire after all other checks, such as validation rules, primary key enforcement, and null value enforcement, are performed. However, unlike field- and record-level validation rules, triggers do not fire on buffered data.

In This Section

  • Enforcing Business Rules
    Provides an overview about how to enforce business rules by using validation rules, preventing duplicate values in fields, and maintaining relationships between tables.

  • Working with Tables
    Introduces creating and working with tables.