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?

up vote 3 down vote accepted

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.

  • reference table sounds good! – chiliNUT Aug 30 '17 at 3:48
  • Max I somewhat agree with not needing nomenclature for its own sake, however this has been extremely relevant lately in the context of seeders, where the seeders seeding so called "mutable" tables are seeding them with truly fake data, but the seeders seeding "reference tables" are seeding them with more or less real data – chiliNUT Aug 30 '17 at 3:51

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.