Require help in setting up schema

Hey DF Community,

I am a newbie and requires help on setting schema for database for my new app. The requirements are mentioned below:


  1. User Table (Already defined in the system)
  2. Groups Table


  1. Users are able to form new groups.
  2. Users who create the group are assigned admin to the group and have ability to add/ remove other users to the group and even delete a group.
  3. Users who are not admin to the group have only the options to join a group by a sending a request and leaving the group.
  4. And off course, no user should be able to hack others’ comments.


  1. How to create roles allowing a user to become a group administrator?
  2. How to change roles for users who just created a group to be now called a group administrator?


  1. The schema I have created here is based on my understanding. Please change it if you think it’s needed.

You might want to provide more info on what you have tried, and what did or did not work. Generally speaking, “build-my-app-for-me” type of questions won’t garner much attention.