ENGLISH
REFERENCE

foreign key

compound.
C1 Advanced Databases
Definition

compound. a field in a database table that connects to a different table. You use it to link information together, like connecting a customer's ID to their specific orders.

compound. a column or group of columns in a relational database table that provides a link between data in two tables. It acts as a cross-reference by pointing to the primary key of another table, thereby maintaining referential integrity.


SIMPLE

The customer ID is a foreign key in the orders table.

CONTEXTUAL

When designing the database, we used a foreign key to ensure that every order is linked to a valid product ID.

COMPLEX

Enforcing referential integrity through a foreign key prevents the database from containing orphaned records, as the system will reject any entry that does not have a corresponding primary key in the parent table.

Origin

A compound of the adjective foreign, denoting an external or outside source, and the noun key, used in the sense of a unique identifier. The term emerged from the relational model of data developed in the early 1970s.

Etymology adapted from Wiktionary, available under CC BY-SA 4.0.

Usage

Commonly used in the context of relational database management systems (RDBMS).

Related words

Last updated July 22, 2026