We always name lookup tables – such as Countries,Cities,Regions … etc – as below :
EntityName_LK OR LK_EntityName ( Countries_LK OR LK_Countries )
But I ask if any one have more better naming conversions for lookup tables ?
Edit:
We think to make postfix or prefix to solve like a conflict :
if we have User tables and lookup table for UserTypes (ID-Name) and we have a relation many to many between User & UserTypes that make us a table which we can name it like Types_For_User that may make confusion between UserTypes & Types_For_User So we like to make lookup table UserTypes to be like UserTypesLK to be obvious to all
Before you decide you need the “lookup” moniker, you should try to understand why you are designating some tables as “lookups” and not others. Each table should represent an entity unto itself.
What happens when a table that was designated as a “lookup” grows in scope and is no longer considered a “lookup”? You are either left with changing the table name which can be onerous or leaving it as is and having to explain to everyone that a given table isn’t really a “lookup”.
A common scenario mentioned in the comments related to a junction table. For example, suppose a User can have multiple “Types” which are expressed in a junction table with two foreign keys. Should that table be called
User_UserTypes? To this scenario, I would first say that I prefer to use the suffixMemberon the junction table. So we would haveUsers,UserTypes,UserTypeMembers. Secondly, the word “type” in this context is quite generic. Does aUserTypereally mean a Role? The term you use can make all the difference. IfUserTypesare really Roles, then our table names becomeUsers,Roles,RoleMemberswhich seems quite clear.