KEYS → Lesson 3: Relationships Without Foreign Keys How is this line different from all the others? Primary Potential PRIMARY KEY UNIQUE + NOT NULL Unambiguously identifies a string that is not NULL. You can change it, but there's usually no reason to. Unique and minimal: no unnecessary columns. In PostgreSQL, the UNIQUE constraint allows multiple NULL values by default; the key must be NOT NULL. players.player_id players.nickname External Compound FOREIGN KEY PRIMARY KEY (a, b) A reference to a PK or UNIQUE column in the same or a different table. The database checks whether the row being referenced exists. A row is defined not by a single column, but by two or more. match_participants.player_id (match_id, player_id) A stable surrogate is usually a good choice for independent entities. For relationship tables, a composite key consisting of two foreign keys is often appropriate.