Triggers have many benefits:
a. Audit trails: Special logging table that lets us quickly tabulate and display the results to an impatient executive.
b. Validation: We can use triggers to validate data before updating the database.
c. Referential integrity enforcement: Table relationships remain stable throughout the lifetime of a project
Question:What are the differences between before triggers and after triggers?
Before trigger when validating or modifying data that we intend to insert or update. On the other hand, an after trigger should be used when data is to be propagated or verified against other tables, and for carrying out calculations.