Chapter 22. Auxiliary Tables

AUXILIARY TABLES ARE A way of building functions and lookup tables that would be difficult, if not impossible, to do with the limited computational power of SQL. What SQL is good at is working with tables. Auxiliary tables are not really a part of the data model, but serve as adjuncts to do queries via joins rather than computations.

Auxiliary tables are usually very static and are constructed from an outside data source. Thus they do not require the same constraint checking that dynamic tables do. As a general statement, they need to have a primary key declared so that it will create an index for searching and joining the auxiliary table to other tables in the schema, not to protect the data from redundancy.

The ...

Get Joe Celko's SQL for Smarties, 3rd Edition 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.