I design a system with multiple roles and they have different fields. Should I design different role tables, or extract a basic information table?
Suppose I extract a basic information table, and I want to design permissions, so I make a role table and use the user role table to associate it. Then, where to put the specific field information of different roles, I need to build the specific fields of different roles. Is the information table then associated to different roles?
In the actual system, the role fields are similar, but the permissions are different. Can we take a step back and think about whether the role definition is reasonable, and then do the database design? There may be a problem with the analysis.
This is actually a permission management module. Generally, users are placed in one table, permissions are in another table (controllers and methods), and the last user's permissions table is in one table. After the user logs in, just remove its permissions. Methods without permissions are not allowed to be executed.