0

I am trying to design an ER model for my database using RBAC approach.

This is the description: The company has many employees, each employee has several functional roles and an organizational role. Functional role consists of three roles counselor, counselee and super user. Each group consists of a counselor and N counselees, all groups are under supervision of a super user. The counselor of the group can only edit the reports of his/her counselees.

My question is should I create separate tables for both functional roles and organizational roles? or is there any better approach for this scenario?

The challenging part is about the part which a user can be a counselor in group A and be a counselee in group B at the same time.

6
  • you'll need PERSON, ORGANIZATION, and GROUP tables, and then linker tables in between with a column for the 'role' and possibly the dates where this relationship was active.
    – Randy
    Commented Mar 19, 2018 at 12:27
  • So for instance we put Functional Role in a separate table as you said, but what about Organizational Role? Should it be as an attribute in PERSON table? and then how we can handle the challenging part as I mentioned in my question Commented Mar 19, 2018 at 15:55
  • there would be one relationship table between People and Groups and another table between people and Organization - each would have its own Role attribute
    – Randy
    Commented Mar 19, 2018 at 19:54
  • Have you looked into existing solutions? RBAC or ABAC frameworks? Commented Mar 20, 2018 at 7:32
  • I tried to manage it with ABAC framework, but it was quite complex, I found a similar solution here laracasts.com/discuss/channels/general-discussion/… But still it has some doubts, I start trying in practical and find out what kind of problems I will face Commented Mar 23, 2018 at 13:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.