I am currently developing a simple CRM system. These are my tables: user
s, roles
, role_users
, customers
.
Rules:
- A user can only be assign with a single role
- A role can have a 1 or many users
- A Customer is assigned to a user
Question:
Did I mark the correct relationship in the screenshot above?
Best Answer
If a user can have no more than a single role, and this will ever change, then put
role_id
directly on theuser
table, then the relationship betweenrole
table anduser
table is a single role to many users.