FirefoxRocks 0 Report post Posted April 12, 2009 I'm wondering what the most efficient way of doing this is.I have a table with users in it, each user has a unique id.Now suppose I had a table with groups in it. Each user can join the group. I estimate that the maximum size of a group would be 100 users.How do I store the user IDs in the group table? Do I make a column called `members` and store them in a semicolon separated list? If so, how do I delete members?Then again, there might be other methods I've never even thought of so I'm open to ideas. If it helps, a user could join probably 10-15 groups (this could change). Share this post Link to post Share on other sites
yordan 10 Report post Posted April 12, 2009 Of course you don't need to store the username in the group table, because there is already a table associating the userid to his name.I would like to know if each user is in a unique group ? Then, the table could have two colums, groupid and userid. Share this post Link to post Share on other sites
FirefoxRocks 0 Report post Posted April 12, 2009 No, the user can join more than 1 group.In another forum I was told to make a table that contains the user ID and the group ID. Share this post Link to post Share on other sites
yordan 10 Report post Posted April 12, 2009 No, the user can join more than 1 group.In another forum I was told to make a table that contains the user ID and the group ID.Correct, in a relational model, a table with userid and groupid is the best way. Share this post Link to post Share on other sites