If you get to design a Database table for users, will stuffing all users with different role be best option in long term maintainability, database programming, web development. Take this situation as a example , I am asked to design a Database for Forum & manager wants only one table for all the users be it Admin, Moderator,Registered,Guest roles. I think it would be not such a good idea (and I am unable to find reasons, just inner feeling). How can I persuade manager that having many tables like for admin & another for all is a good idea. You can also apply similar thing to basecamp site where here is the hierarchy:
Company
- Admin
- Employees
- Clients
- Managers
Even though they only differ by roles, having different tables is good right?
A single table for all users will definitely be the easiest to manage and code against. Just have a column defining the user type, or a permissions table that keeps track of which permissions the given user has. Having separate tables will be a major coding hassle, and conceptually, isn’t most of them exactly the same? E.g. admin is just a moderator with more permissions, same goes for user vs moderator, etc.