SQL
Candidate, Primary, Alternate and Composite Keys
The vocabulary of keys, explained on one table: which columns could identify a row, which one you choose, and what happens to the rest.
Primary, candidate, alternate, composite, natural and surrogate keys.
2 notes
The vocabulary of keys, explained on one table: which columns could identify a row, which one you choose, and what happens to the rest.
Should the primary key come from the data or be generated? The trade offs, the failure modes of each, and the pattern most teams settle on.