Understanding Database Triggers for Audited Tables

The database triggers for audited tables write records to the audit tables (shadow tables) for Insert and Delete functions. For Insert, the after image is stored in the audit table. For Delete, the before image is stored in the audit table.

For the Update function, the database triggers only write records to audit tables when either the primary key columns or the specified audited columns are changed. A record is written in the shadow table when the new value is different from the current value. No record is written if they are the same. If the trigger is executed for update, before and after images of the record change are recorded in the audit table.

The trigger templates for all databases are stored in the Database Object Template Information table (F986112).