Part 1 of 5 · 1 min read
Why this page comes first
In this module you will
- Name all five constraint types covered here and what each one enforces.
- Write a CHECK constraint expressing a business rule.
- Explain why a constraint is stronger than an application-layer check alone.
- Predict what happens to an insert or update that violates a given constraint.
Earlier modules used PRIMARY KEY and FOREIGN KEY without naming them as one category. This page names the full set of integrity constraints together, and shows the two that have not appeared yet: CHECK and UNIQUE.