To maintain relationship between data.
When marital status is updated from "Married" to "Unmarried", trigger will delete the spouce and marriage details.
Trigger are backend validations that minimize front end coding/script
triggers are sql code that gets executed when certain events happen, and either before or after.
They can be BEFORE or AFTER
And tied to the operations INSERT, UPDATE, DELETE.
Many people use triggers +sequences to populate unique auto increment keys, as they're very fast. others use triggers for value validation. others use triggers to perform auditing (ie track when something was created/updated)
Bookmarks