Databases & SQL

Foreign Key

/ˈfɒrɪn kiː/

Definition

A column that references the primary key of another table, enforcing referential integrity between related data.

Example in context

"orders.user_id is a foreign key to users.id — the database rejects orders for non-existent users."

Practice this term

Master Foreign Key in context by working through exercises in the Databases & SQL module. You'll see the term used in real engineering scenarios with multiple-choice, fill-in-the-blank, and matching drills.