www.webdeveloper.com
Results 1 to 6 of 6

Thread: What is the best way to store a friends list?

  1. #1
    Join Date
    May 2012
    Posts
    2

    What is the best way to store a friends list?

    Hi,
    This is my first post here so firstly id like to start with hi and i hope everyone is well.

    All the languages i know i have taught myself so please do forgive me if i just don't seem to understand.

    I am wondering what the best way to store a Facebook like friends list would be? currently I am storing in a MySQL database and it seems to work fine. However, I am unsure if the databases has a size or column/row limit. XML seems like a simpler option but I am unsure if it would be pretty long winded, space consuming and slow to give every user his/her own XML file.

    I am just wanting someone else's view on this problem just to get a second opinion...

    any advice or help would be greatly appreciated

  2. #2
    Join Date
    May 2012
    Posts
    37
    I think a database would be the most appropriate and efficient. Not exactly sure what you mean by column or size limit... there's probably a theoretical limit somewhere - but don't worry about it. Depending on the field type, there are constraints but if you haven't noticed a problem yet you're probably fine
    "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
    -- Douglas Adams

    http://www.chaoscontrol.org
    Have you minified your CSS/JS lately?

  3. #3
    Join Date
    May 2012
    Posts
    2
    thank you, i have decided to stick with the database. your prob right, if it aint broken no point of trying to fix it

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,337
    Definitely database. I currently work with a PostgreSQL database that has one table with about 27,000,000 rows, and it works fine. (Of course, you want to make sure you have indexes where needed so that you don't do complete table reads on every query. )
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    May 2012
    Posts
    42
    Your only real "limit" on how big your database can be is the hard drive on your server.

    Unless you have more than a "gazillion" friends, I doubt you have to worry about drive space. Like NoDog said, make sure you have the correct indexes set up just to keep it speedy when looking up data.
    Keith

    Freelance PHP Web Developer
    http://www.duvalltech.com/

  6. #6
    Join Date
    May 2012
    Posts
    59
    http://dev.mysql.com/doc/refman/5.0/...ize-limit.html

    Don't use XML... it tends to be best used in web development for importing and exporting data thanks to the rigid structure of xml. DO NOT store the kind of data you are asking for in it! A database is the correct storage engine for it

    Kind regards,
    Scott

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles