My DB model is shown in the picture. Does this design look good? I welcome comments and ideas.


  • User role table keeps track of all possible roles a user can have

  • Role table has all possible roles such as admin, user, trainer

  • Since user relationships are predictable, I can make
    partyRelationship read-only with pre-populated values. Exmaple - From role=admin, to role= user , From role=trainer, to role= user


  1. A user can have multiple roles such as admin, trainer.
  2. A user can be related to another user in more than one way.

    enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.