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 agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.