Facebook database design?
Posted
by Marin
on Stack Overflow
See other posts from Stack Overflow
or by Marin
Published on 2009-06-17T19:17:39Z
Indexed on
2010/04/11
15:03 UTC
Read the original article
Hit count: 338
I have always wondered how Facebook designed the friend <-> user relation.
I figure the user table is something like this:
user_email PK
user_id PK
password
I figure the table with user's data (sex, age etc connected via user email I would assume).
How does it connect all the friends to this user?
Something like this?
user_id
friend_id_1
friend_id_2
friend_id_3
friend_id_N
Probably not. Because the number of users is unknown and will expand.
© Stack Overflow or respective owner