MySQL Forums
Forum List  »  Newbie

DB structure: users, groups & permissions
Posted by: Rom Grk
Date: January 14, 2015 05:44PM

Hello,

I would like some advise on the following subject.

I have 2 data models:
- Users:
ID, name, permissions & group
- Groups:
ID, name, location, etc.

Currently, 1 user can only belong to 1 group.
Now, I would like to update this so that one user can belong to multiple groups. So my initial idea was to change the User.group field to accept multiple groups instead of just one. However, I do not feel that this is a good idea.
Should I create a table for each group, and in that table have a list of users, or should I go with the list-field option?

Also, I have a similar questioning in a forum-like section that I have to build. Any advice on how I should structure this DB?

Thank you for your time.

Options: ReplyQuote


Subject
Written By
Posted
DB structure: users, groups & permissions
January 14, 2015 05:44PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.