Enable
the database programmer to specify:
• when to check a constraint,
• what exactly to do.
•
A
trigger has 3 parts:
• An event (e.g., update to an attribute)
• A condition (e.g., a query to check)
• An action (deletion, update,
insertion)
•
When
the event happens, the
system will check the constraint,
and
if
satisfied, will perform the action.
NOTE: triggers may cause cascading effects.
Database
vendors did not wait for standards with triggers!