Let's say I have a users
table, and each user has a different level of privilege. I have a privileges
table with four rows that looks like this:
id | level
---+-----------
1 | viewer
2 | editor
3 | admin
4 | super-admin
In the business context, my users all have a privilege level, 1-4. The users
table holds the corresponding user data, and it gets modified when users are modified, added, or dropped, but privileges
never really changes, it is just a reference of the four established privilege levels.
Is there a name or term for this type of table?
Best Answer
It could be called an enum, a reference table or a meta-data table.
I prefer to call that kind of table by its real name, i.e. in your case "privileges" or perhaps "PrivilegeLevels". I don't tend to make distinctions between tables where rows change, and tables where rows don't often change since that tends to needlessly add nomenclature for its own sake.