Finding the right terminology for a dictionary table
- by Karl Forner
My concern is about what I currently call "dictionary tables", that are database tables
containing a list of controlled vocabulary.
Let's use an example:
Suppose you have a table User containing fields:
user_id : primary key
first_name
last_name
user_type_id : foreign key to the UserType table
and another table UserType with just two fields:
user_type_id : primary key
name : the name/value of a particular type of user.
For instance, the UserType table may contain (1, Administrator), (2, PowerUser), (3, Normal)...
My question is: what is the canonical term for a table like UserType, that only contains a list of (dictinct) words.
I want to publish some code that help managing this kind of tables, but first I have to name them !
Thanks for your help.
Current state of thought:
For now I feel Lookup Tables is a good term. It is also used with the same meaning in these posts:
http://dbix-class.35028.n2.nabble.com/RFC-Component-for-Lookup-tables-td3504085.html
http://tonyandrews.blogspot.de/2004/10/otlt-and-eav-two-big-design-mistakes.html
Lookup Tables Best Practices: DB Tables... or Enumerations
The only problem is that lookup table is also sometimes used to name a junction table.