RDBMS Fundamentals

Foreign Key

English

Overview

A field that references another table's primary key, representing a relationship between tables.

Details

A column that references another table's primary key, combined with a referential-integrity constraint to represent a relationship between tables. You can specify what happens when the referenced row is deleted -- ON DELETE CASCADE to delete along with it, or ON DELETE SET NULL, for instance -- which prevents orphaned records from being left behind.

More Database terms