Chapter 4. Lookup Tables
LOOKUP TABLES ARE a special case of auxiliary tables, but I wanted to treat them first since they are the most common case in real schemas. The “freshman” SQL programmer thinks that tables are the same as files and do not need to have any relationships among them enforced by declarative referential integrity (DRI) constraints. The “sophomore” SQL programmer was overly impressed by referential integrity constraints and assumes that all tables in a schema have to be linked via DRI. The better design for a schema lies somewhere in between.
A lookup table is used in SQL for the same purpose as a function or procedure in a computational language. For example, you can easily find the formula for the sine function and write ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access