Thursday, November 13, 2008

How to design social network database

We have moved. Please proceed here

11 comments:

Justin said...

I had recently looked for another website design or database related blog then suddenly i looked to your blog its related with my.Thanks for that.you gave a good tutorial..

Unknown said...

that's a nice tutorial, thanks a lot

Anonymous said...

can you please give more details on how the tables are created?

one the friends table:
are AccountID and Friend ID are both foreign keys?

Thanks!

Juzar said...

Thanks for starting this discussion. Now the biggest concern for a person who would go in for this design is that the size of the Friends table can become a monster within a day. So how about this :
1) Account table would be as is
2) Friends table would have two columns - id, accountId, friendIdCSVList. Here since accountId alone cannot be a primary key, id + accountId can be a composite key.
3) FriendRelationDetails table would have columns like - accountId, friendId, startDate, visible etc. Here accountId + friendId is a composite primary key

What say?

Anonymous said...

Original contents are probably from
HEREdont know who is real writer???????

Unknown said...

hey,may i know how to retrieve data of my friends in the account table using php and mysql and show the retrieve data in table...please help urgent

Unknown said...

hey,may i know how to retrieve data of my friends in the account table using php and mysql and show the retrieve data in table...please help urgent...please email me how to do that ..changwl8888@gmail.com....thanks

it services phoenix  said...

Those are some excellent tips and it really goes to show the quality of your posts on design. Yes, fantastic information and very useful for me.

Anonymous said...

This blog seems to be identical to the following: http://www.communitymx.com/content/article.cfm?cid=A1A63

But the two show different authors. Unless I am overlooking something.

Mutuelle sante said...

Thank you it was a fantastic support, now to design social network database is very easy with the help of your advice. Thanks

Anonymous said...

Thanks for the post..
While selecting friends infromation(my friends + i'm friend to) i need to write two queries as you said...

Is there any other design so that i can retrive my friends info in a single query...

can you help me..?

What are the other DB table design used by social networking sites