ISC Databases · Updated November 2026
Primary Key vs Foreign Key: What Is the Relationship?
Primary key identifies a record. Foreign key connects one table to another.
Primary key
A primary key uniquely identifies a record inside its own table.
Foreign key
A foreign key references a key in another table to connect related records.
One-to-many
One customer can have many orders. The customer is stored once and each order references that customer through a key.
Normalization
Normalization reduces unnecessary duplication and update anomalies by placing data in appropriately related tables.
Referential integrity
Proper foreign-key constraints can prevent records from referring to nonexistent parent records.
The takeaway
Primary key identifies. Foreign key connects. Normalization reduces repetition.
Related Summit guides
FAQ
Can a primary key contain duplicates?
No.
Can many orders share the same customer foreign key?
Yes.
Why normalize a database?
To reduce redundancy and update anomalies.
