mysql - table design with multiple roles having different fields
滿天的星座
滿天的星座 2017-05-19 10:07:01
0
2
680

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?

滿天的星座
滿天的星座

reply all (2)
某草草

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.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!