Computer Science / Unit 8 CS 0422 short lesson, about 20 seconds
The Foreign Key
Captions available
The idea
A foreign key is an attribute referencing a primary key in another relation — the mechanism by which separate tables link, and the relational model's answer to relationships.
In practice
An orders table carrying each customer's identifier holds the thread back to the customer table.
Where people slip
The reference is the relationship; nothing else stores it.
Your place on the trail
Every lesson rests on earlier ones and opens later ones. Tap any to jump.
Something wrong in this lesson? Flag it · Sources for Computer Science