What is a lookup table?
I just gave a database diagram for a DB I created to our head database person, and she put a bunch of notes on it suggesting that I rename certain tables so it is clear they are lookup tables (add "lu" to the beginning of the table name).
My problem is that these don't fit the definition of what I consider a lookup table to be. I have always considered a lookup table to basically be a set of options that don't define any relationships. Example:
luCarMake
-----------
id Make
-- ---------
1 Audi
2 Chevy
3 Ford
The database person at my work is suggesting that I rename several tables that are just IDs mapping one table to another as lookup tables. Example (Location_QuadMap below):
Location
----------
LocationId
name
description
Location_QuadMap <-- suggesting I rename this to luLocationQuad
----------------
QuadMapId
LocationId
luQuadMap
---------
QuadMapId
QuadMapName
Is it safe to assume that she misread the diagram, or is there another definition that I am not aware of?
Solution 1:
What you have there is called a junction table. It is also known as:
- cross-reference table
- bridge table
- join table
- map table
- intersection table
- linking table
- link table
But I've never seen the term "lookup table" used for this purpose.
Solution 2:
Pick your battles, but I'd ask for the person to clarify the naming convention seeing that they've suggested using the same convention for one-to-many and many-to-many relationships. Looks like any foreign key relationship means there's a "lookup" table involved.
If that's the naming convention for other databases, then I wouldn't push my luck.