Who are my friends? SELECT DISTINCT name AS my_friendFROMFriendOfFriend.Friend f, FriendOfFriend.MyFriendmy_fWHERE f.id = my_f.friend_id_1 and my_id = 1
What about who are my friends of a friend?
What about who are myfriends of a friend that also like the same thing I like?
What would it be in NEO4J? (CYPHER) START me=node(10)MATCH me-[:friend]-friend-[:friend]-friend_of_friend RETURN friend_of_friend
Why Graph Database?• It feels natural• Fast in highly connected data (embedded)
Things to remember!• Don’t use it because it’s COOL!• NoSQL should be also considered when appropriate, do not just go for relational databases• It’s not really schema-less, the schema is in the code• We still need DBAs.