On what Basis are you getting Recommendations from Facebook??How your data is stored Internally in Social Network Sites ??
Consider the sample example of a small graph which has 3 users A,B,C.
If you use SQL u need to join all 3 records together based on 'friends' field and need to find out the transitive relationship between A,B,C which is time taking.
The above example is a very basic one.More recommendations can be found out using mutual LIKES between two users,games,pages,etc...what not..!! These things can be easily implemented using GraphDatabase and it is very efficient than SQL.
I feel GraphDatabases are very efficient to use for social networking,spatial search,recommendation engines(Ex: Amazon,Facebook),etc ....
Have you ever thought how your information is stored by facebook in database?? Do you think its SQL that facebook is using for storing your data ?? If you think so ,then you are wrong.Its NoSQL GraphDatabase called 'Cassandra' what facebook uses to store your data.I know after reading this you will get lot of questions in your mind. 'What is Graph database?? How it looks like?? How it can be useful for Facebook Recommendations?? Where else it can be used??'.Let me explain each one in detail.
What is Graph database??
I think Wikipedia gives the best answer for this question.So i think i can just add a link to wikipedia for the introduction of graphDatabase. Here you go..!!
How it looks like??
I thing you got a basic idea about graph database after seeing Wikipedia page.Here i am showing sample example of a small Social Network of friends who KNOWS each other.
How it looks like??
I thing you got a basic idea about graph database after seeing Wikipedia page.Here i am showing sample example of a small Social Network of friends who KNOWS each other.
You can Imagine the entire Facebook database as a infinite Graph where the users keep on increasing day by day.Some thing like this
Where each node represents each Facebook user or page and each edge between two users represents a FRIEND and LIKE relationship.
Where each node represents each Facebook user or page and each edge between two users represents a FRIEND and LIKE relationship.
How it can be useful for Facebook Recommendations??
- A - friend of B
- B - friend of A,C
- C - friend of B
If you use SQL u need to join all 3 records together based on 'friends' field and need to find out the transitive relationship between A,B,C which is time taking.
The above example is a very basic one.More recommendations can be found out using mutual LIKES between two users,games,pages,etc...what not..!! These things can be easily implemented using GraphDatabase and it is very efficient than SQL.
Where else it can be used??
Comments
Post a Comment