4.1. Data Element Names
This is a short list of postfixes that can be used as the name of the key column in auxiliary tables. There is a more complete list of postfixes in my book SQL Programming Style(ISBN: 0-12088-797-5). The most important point is that the primary key of an auxiliary table cannot be an identifier (“_id”) because an identifier uniquely references an entity. Auxiliary tables do not hold entities; they deal with attribute values and computations.
“_nbr” or “_num” = tag number; this is a string of digits that names something. Do not use “_no” since it looks like the Boolean yes/no value. I prefer “_nbr” to “_num” since it is used as a common abbreviation in several European languages.
“_code” or “_cd” = a code, which is a standard ...
Get Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.