Results 1 to 6 of 6

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

  1. #1
    Join Date
    May 2012

    What is the best way to store a friends list?

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

    Have you minified your CSS/JS lately?

  3. #3
    Join Date
    May 2012
    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
    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. )
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  5. #5
    Join Date
    May 2012
    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.

    Freelance PHP Web Developer

  6. #6
    Join Date
    May 2012

    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,

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