Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    2

    Unanswered: myspace type DB for managing friends

    I'm working on a project that will have a similar DB to how myspace manages friends.

    I'm trying to determine the best way to build this out, as one user could potentially have hundreds of thousands of friends...

    Would it be best to create an ID table that simply holds the UserID and the UserID of the friend? OR would it be best to just use longtext and hold all friends UserIDs in an array for a paticular user?

    Any help would be great... thanks!

  2. #2
    Join Date
    Aug 2006
    Posts
    1
    I would think that using a string that you later must parse and sort would be too intensive on any system. Instead, let the database do what it does best -- store, sort, and index data. I've never done it before, but if you use two columns (for each userid), you could also inherently store which friend made the friendship request (FromFriend, ToFriend). You can even put a status column to indicate what stage that friendship is in (requested, accepted).

    Hope that helps somewhat.

  3. #3
    Join Date
    Aug 2006
    Posts
    2
    Quote Originally Posted by allera
    I would think that using a string that you later must parse and sort would be too intensive on any system. Instead, let the database do what it does best -- store, sort, and index data. I've never done it before, but if you use two columns (for each userid), you could also inherently store which friend made the friendship request (FromFriend, ToFriend). You can even put a status column to indicate what stage that friendship is in (requested, accepted).

    Hope that helps somewhat.
    Very true... thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •