9.3. State Transition Tables
When most newbies think of constraints, they know only static column constraints, such as NOT NULL, DEFAULT, and CHECK () clauses. A little bit later, they will learn about simple declarative referential integrity (DRI) constraints. That means simple PRIMARY KEY and REFERENCES clauses with some simple actions to bring the database to a state consistent with business rules.
The bad news is that there are not enough SQL constructs for all business rules. A transition constraint says that an entity can be updated only in certain ways. These constraints are often modeled as a state transition diagram. There is an initial state, flow lines that show what the next legal state(s) are, and one or more termination states. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access