Composite key
A key made of two or more columns that identify a row only when taken together, such as order number plus line number.
Checking for duplicates on one part of a composite key gives false alarms. The same order number is supposed to appear on every line of that order.
Where it comes up
- Duplicate keys with conflicting valuesTwo rows share an identifier that should be unique, but disagree on other fields.
See also
- Primary keyA column, or set of columns, whose value is unique for every row and identifies it: a customer number, an order ID.
- Natural keyA key made from a value that already means something outside the database, such as an email address, a tax number, or a vehicle identification number.
- UniquenessWhether each real thing appears only once in a dataset: one row per customer, and no order number used twice.