8

Auxiliary Tables

Auxiliary tables are a way of building functions and look-up 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.

They are usually very static and constructed from an outside data source. Thus they do not require the same constraint for safety; however since the optimizer can use the constraints for queries, you should include them. As a general statement, they need to have a primary key declared so that it will create a fast access method for searching and joining the auxiliary table to other tables in the ...

Get Joe Celko's SQL for Smarties, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.