Trigger Use Cases and Limitations
What triggers are genuinely good at, the costs they impose, and the honest list of reasons teams end up removing them.
Rules the database enforces on data.
7 notes tagged
What triggers are genuinely good at, the costs they impose, and the honest list of reasons teams end up removing them.
Detect duplicate rows on any definition of "duplicate", inspect them safely, delete all but one, and add the constraint that stops them coming back.
The three kinds of integrity a relational database enforces, why redundancy causes anomalies, and where a derived value is worth its maintenance cost.
What happens to child rows when a parent is deleted or updated, how to choose between RESTRICT, CASCADE and SET NULL, and how to add, drop and disable...
The two constraints that give a database its structure: one that identifies a row, and one that guarantees a reference points at something real.
The four constraints that guard a single table. What each one enforces, how NULL interacts with UNIQUE and CHECK, and why the database is the right pl...
DELETE removes rows permanently. Learn targeted deletes, deleting through a join, soft deletes and the habits that stop a one line mistake becoming an...