I am currently developing a simple CRM system. These are my tables: users, roles, role_users, customers.

enter image description here


  • 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?

  • Missing one rule: If a Customer is assigned to a User, can a User have many Customers? Or is it really a customer has one User ID and that User ID is used by only one customer? Commented Dec 1, 2016 at 23:05

1 Answer 1


If a user can have no more than a single role, and this will ever change, then put role_id directly on the user table, then the relationship between role table and user table is a single role to many users.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.