Hi I am planning to design a social networking site (like orkut) asp.net mvc.I am stuck in database design.Anyone provide me the resource for that one.
Thanks in Advance.
Hi I am planning to design a social networking site (like orkut) asp.net mvc.I am stuck in database design.Anyone provide me the resource for that one.
Thanks in Advance.
You can figure out the fields/queries and everything else, but the basic tables are very simple:
That is the basis of it and this layout is probably sufficent enough to mock Twitter (which is a very simple site).
Anything additional you should probably use your brain to figure out. It really isn't that hard. Facebook didn't become popular for creating a good database schema.
These are the steps you should follow for initial database design.
First, list down all the "objects" you want to store, such as users, posts, relationships and so on.
Second, figure out, for each of those, what information you want to store (user name, password, full name, address, ...).
Then design your database tables following the third normal form.
Database design should always be done in third normal form, reverting to other forms if there is a performance problem and you understand the ramifications of reversion. You can generally do this safely (and efficiently) with the proper application of computed fields or triggers.
As an example, one thing you should not do is to try and model relationships in the users table. A row in that table will have the user name as the key and a relationship depends on two user names, so that would violate rule 3.
Barry Williams hosts a library of free data models, which he offers as starting points for all sorts of applications. His portfolio includes a suggested model for a social networking site; that page also includes links to some supporting information. Find out more.
HI I am also designing a site like this and would like to know if the relationship tables would be a good way to go. A site like facebook has 500 million users so the relationship table must be at least 150 times that. If you had to search for friends it would take a very long time. So Im guessing that each user either has his own table of friends or a csv file associated with them with a list of their friends. Any help with this would be very helpful to my design. Thank You..
There will be two main tables for user module i.e. 1.tblUser(userId(P key),other detail columns) 2.tblContacts(UserId(F key from tbluser),ContactId(F key from tbluser) and both userid and contactid will be primary key mean to say composite key)