Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (14 April 2014 - 05:28 PM) By The Way, This Could Be An Interesting Subject For A Topic, What About Posting This Question? Let's See If Other People Have The Same Feeling Concerning Bootlists!
@  yordan : (13 April 2014 - 09:36 AM) Boot Order : Cd, [Usb,] Hard Drive :D
@  yordan : (11 April 2014 - 07:23 PM) I Simply Let The Bios Do That
@  Ritesh : (11 April 2014 - 10:23 AM) Is It Possible To Launch Fedora Live Cd Or Installation Disk From Hard Drive On Windows Platform Using Grub Mbr File.
@  Ritesh : (11 April 2014 - 10:21 AM) No U Are Not.. Btw.. I Have Question For You.
@  yordan : (10 April 2014 - 08:02 AM) You Are Partially Right.
I Was Not.
Nevertheless, I Am Again :)
@  Ritesh : (09 April 2014 - 07:33 PM) :P
@  Ritesh : (09 April 2014 - 07:33 PM) I Think U R Not..
@  yordan : (09 April 2014 - 09:28 AM) I'm The Master Of The Shoutbox!
@  yordan : (05 April 2014 - 10:32 PM) He-He
@  Ritesh : (04 April 2014 - 06:59 PM) Ha Ha Ha ....
@  yordan : (04 April 2014 - 11:15 AM) Welcome Back, Starscream!
@  yordan : (03 April 2014 - 02:31 PM) And I Hope That He Will Come Back Soon :)
@  yordan : (01 April 2014 - 02:53 PM) Nice, Ritesh Came, I'm Not Home Alone Today.
@  Ritesh : (01 April 2014 - 08:51 AM) Oh!!! Poor Dear Yordan..
@  yordan : (31 March 2014 - 10:02 AM) I'm A Poor Lonesome Cow-Boy
@  yordan : (27 March 2014 - 02:22 PM) He Is Unpatient Due To His Patients!
@  Ritesh : (27 March 2014 - 10:46 AM) :(
@  Ritesh : (27 March 2014 - 10:46 AM) He Is Busy With His Patients.
@  yordan : (26 March 2014 - 08:12 PM) Ahsani, Where Are You?

Photo
- - - - -

Lists Of Users, Etc In Tables


3 replies to this topic

#1 FirefoxRocks

FirefoxRocks

    Super Member

  • [HOSTED]
  • 988 posts
  • Gender:Male
  • Location:Ontario, Canada
  • myCENTs:92.36

Posted 12 April 2009 - 12:41 AM

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).

#2 yordan

yordan

    Way Out Of Control - You need a life :)

  • [MODERATOR]
  • 4,744 posts

Posted 12 April 2009 - 10:16 AM

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.

#3 FirefoxRocks

FirefoxRocks

    Super Member

  • [HOSTED]
  • 988 posts
  • Gender:Male
  • Location:Ontario, Canada
  • myCENTs:92.36

Posted 12 April 2009 - 03:39 PM

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.

#4 yordan

yordan

    Way Out Of Control - You need a life :)

  • [MODERATOR]
  • 4,744 posts

Posted 12 April 2009 - 06:15 PM

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.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users