I have been persuaded to create a more generic table called “User” and add a column called “RoleType” to distinguish between ‘Admins’, ‘Visitors’, ‘Customers’, etc.
My question is, “What Data-Type should I use?”
I tend to prefer verbose data-types because looking at a column with integers in it tells someone else looking at an isolated table NOTHING!!
By contract, seeing ‘Admins’, ‘Visitors’, ‘Customers’, etc. in a column is pretty self-documenting when the column is called “RoleType”.
The only down-side is that it is more of a pain programmatically to have to look for a string versus an integer value.
I agree, but back in my MS Access days you’d be labeled a heretic for saying that! (Way too much over-normalization and using too many id’s and codes in that world?!)
It would be more of a pain using numbers since then you’d need to be constantly looking up what a particular number means.
If you do use numbers then the simplest solution is to add a lookup table that converts them to the appropriate descriptions so that you can substitute those for the numbers.