Databases
Trigger
Code that the database executes automatically when a specific event occurs on a table - typically an INSERT, UPDATE, or DELETE.
Triggers enforce business rules at the database level regardless of which application wrote the data. The trade-off is that they execute invisibly, making debugging harder: a simple INSERT may fire multiple triggers, each of which may modify other tables and fire further triggers. Statement-level triggers fire once per statement; row-level triggers fire once per affected row, which can be very expensive on bulk operations.