Jump to content


Photo

trying to implement a friends list, but not sure of how to represent it


  • Please log in to reply
3 replies to this topic

#1 renwoshin

renwoshin
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 22 January 2006 - 12:56 AM

hi,

i'm trying to make a friend's list type thing for our users, but I'm not sure how I should represent it in a database.

Here are the possibilities I thought of:
1) make a table for every username and every row would be a friend
2) make one table for all the usernames and add a column for each friend
3) somehow make a table within a table (is this even possible?) with the inner table being the friends of the username

What do you guys think would be the best representation for a "friend's list"?

#2 renwoshin

renwoshin
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 22 January 2006 - 06:31 PM

specificially, would it be inefficient to add a table for each user? Like, if we had 3000 tables for one database, will that be bad?

#3 renwoshin

renwoshin
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 24 January 2006 - 01:54 AM

so no one knows the maximum number of tables in a database?

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 24 January 2006 - 07:21 PM

Don't do it that way -- I've posted a response to your question on [a href=\"http://www.mysqlfreaks.com/forums/index.php?showtopic=8962&hl=\" target=\"_blank\"]this MySQLFreaks.com thread[/a].
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users