Composite Primary Key

A Primary Key made of two or more columns, typical for a Junction Table where both columns are also Foreign Keys.

When to use

PP 04 Q6 contrasts a composite key with a surrogate key on a many-to-many table. In PS 01 PK(Patient_ID, Treatment_ID) stops a patient receiving the same treatment twice, and Sakila's film_actor has a composite key (actor_id, film_id).

See PP 04.

Appears in