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
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?
thank you, i have decided to stick with the database. your prob right, if it aint broken no point of trying to fix it
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
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.
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
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)