Objective: Simplify Database Architecture
Relational database design is almost as much about relationships between tables as it is about the individual tables themselves. Referential integrity is an important part of proper database design and operation. When you declare a foreign key constraint for a column or set of columns, the values in these columns must exist in the primary key or unique key columns of the parent table. This seems simple enough.
However, some software developers recommend avoiding referential integrity constraints. The reasons you might hear to ignore foreign keys include the following:
-
Your data updates can conflict with the constraints.
-
You’re using a database design that’s so flexible it can’t support referential ...
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