liveBook · Manning

Superkey

As explained in Grokking Relational Database Design

A superkey is a set of one or more table columns whose values uniquely identify a row, possibly including unnecessary columns.

A superkey is one or more table columns whose combined values uniquely identify a row. It may include columns that are not needed for uniqueness. section 4.3 section 6.2

Place superkeys in the larger key hierarchy:

Surrogate keys in transaction tables

The purchase table uses purchase_id as an autoincrementing surrogate primary key, while payment_method uses payment_id. Each identifier uniquely identifies a row; adding an unnecessary column would still produce a superkey, but not a minimal candidate key. section 4.3

Superkeys also support normalization work: identifying keys helps check whether columns depend on a key and whether a table satisfies normal-form requirements. section 6.2

How Grokking Relational Database Design covers it

How deep it goes
Explains uniqueness, unnecessary columns, minimality, and key hierarchy but stops short of detailed dependency analysis.
Examples
Uses purchase_id and payment_id as surrogate primary-key examples for purchase and payment_method tables.
What it assumes
Assumes familiarity with tables, rows, and columns while defining superkeys, candidate keys, and primary keys directly.
What you can do after
Evaluate whether a set of columns uniquely identifies rows and distinguish superkeys from minimal candidate keys.
How it connects
Connects superkeys to candidate keys, primary keys, database normalization, normal forms, and BCNF.

Also explained in

Compare how 2 books explain superkey →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Relational Database Design. The section links point to the parts of the book it draws on.