6. A hard question to ask a relational DB…
Find friends of 3rd degree
7. SELECT P.Name, P3.Name FROM Person P
JOIN PersonFriend F1 ON P.PersonID =
F1.PersonID JOIN PersonFriend F2 ON
F1.FriendID = F2.PersonID JOIN PersonFriend F3
ON F2.FriendID = F3.PersonID
JOIN Person P3 ON F2.F3.PersonID =
P3.PersonID
MATCH (a:Person)-[:KNOWS*3..3]->(b)
RETURN a.name.b.name
SQL
Neo4j
13. Recommendations
Without a graph database, you can still create a
representation of a graph to be used for
recommendations.
But, that will be a static representation, and will
not be able to take into account events in the
current session.