Data modelling - Record
Foreign key
(FK)
A field that links a record in one database table to a record in another
What's it for?
Links one record to the correct related record without copying all of the information again.
For example…
Each order row stores a customer foreign key so the system knows which customer placed it
Each order contains CustomerID as a foreign key pointing back to the customer who placed it
Think of it like…
Your passport number on an airline booking, linking the booking to your passport so the relevant passport details can be found