[Tfug] Any SQL gurus out there?

Claude Rubinson rubinson at u.arizona.edu
Thu Oct 25 16:13:15 MST 2007


On Thu, Oct 25, 2007 at 03:54:21PM -0700, Don Freeman wrote:
> Yes but that's my point. A lookup table is not technically a
> "related" table.

This is why I hate the term "lookup table."  It suggests that the
table is simply a list of aliases and not actually fundamental to the
RDBMS.  A lookup table defines the possible instances of an entity.
If the lookup table for, e.g., the PRODUCTS table isn't populated,
that means that the company has no products (at least as far as the
RDBMS is concerned).  And, of course, due to referential integrity
constraints, one can't insert any items into the PRODUCTS table until
the corresponding lookup table is populated.  If the RDBMS supports
proper cascading deletes, deleting an record from a lookup table will
delete that product from the entire database.  That's the whole point
of using a relational database.

Returning to my original point: there shouldn't be any standalone
tables in an RDBMS.  If there are, there's something wrong (perhaps
just an instance of an unapplied constraint but there's something
wrong).

Claude




More information about the tfug mailing list