20
Constraints
In this chapter:
What is Referential Integrity?
What are constraints and how are they used to implement Referential Integrity?
How are constraints placed into tables?
What else can constraints do?
This chapter shows you how to define constraints on tables. Constraints perform validation on data both within and between tables and, to a lesser degree, with views.
Primary and foreign key constraints are probably the most significant of constraints. These constraints can be used to enforce the validity (integrity) of relationships (references) between rows in tables (entities). A primary key reference is placed on a unique identifying column in a superset entity. A foreign key is placed on a subset table, which contains a copy of ...
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