December 31, 2008 at 6:43 am
Hello members..
I'm going to design a social networking website (like orkut) in asp.net ... but im stuck wid da database design.
Suppose their are 5000 members of my site wid each member having 1000 msgs in his inbox .. now if i use a single table (say InboxMaster) to store all da msgs, then it will be having 5000*1000 = 5000000 rows! ... da condition will become worse as da num of user or num of msgs increases.
Similar problem will arise if i store all da posts of different communities in my website in a single table.
So wot should be da solution .. should i create a new table in my database every time a new user become member of my website to store his msgs .. similarly should a create a new table every time a new community is created by sum member??
pls plss help me in dis regard :crying:
December 31, 2008 at 7:25 am
You should really store all the same data in the same table, having a new messages table for each user will cause massive headaches in the future.
5,000,000 rows is nothing for SQL server to handle, design some good tables with proper indexing and data types and SQL server will perform well with this table.
You may need to read up on data normalisation for some more ideas.
December 31, 2008 at 9:50 am
Good indexing & queries are usually all you need to address large tables successfully. If they really get too large, then you will want to look at partitioning the tables, not making separate tables.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 7, 2009 at 9:34 am
Sorry formy late reply ... my net connection was not working well.. (sob-sob :()
anyways, thanks to both of u for replying me ... i'll now make a single table to store all msgs.
thanks once again! 🙂
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply