Identifier
A value whose job is to name one particular thing, such as an account number, a part number, or a postal code. It is a label, even when it is made entirely of digits.
Identifiers should be stored as text. Treating one as a number invites software to strip its leading zeros, round it, or display it in scientific notation.
Where it comes up
- Identifiers that lost their leading zerosA code that starts with zero, such as a postal code or account number, was read as a number and the zeros were dropped.
- Numbers stored as textA column of quantities contains symbols, separators, or words that stop software reading it as numbers.
- 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.
- Leading zerosZeros at the start of a value that are part of the value, as in the postal code 02134 or the account number 000417.