graph all teh things 111
play

Graph All Teh Things!!!111 Graph Database Use Cases That Arent - PowerPoint PPT Presentation

Graph All Teh Things!!!111 Graph Database Use Cases That Arent Social GOTO Berlin, 2014 Emil Eifrem emil@neotechnology.com @emileifrem #neo4j Neo Technology, Inc Confidential Thursday, November 6, 14 1 Agenda 1. Context 2. Wait! What


  1. Graph All Teh Things!!!111 Graph Database Use Cases That Aren’t Social GOTO Berlin, 2014 Emil Eifrem emil@neotechnology.com @emileifrem #neo4j Neo Technology, Inc Confidential Thursday, November 6, 14 1

  2. Agenda 1. Context 2. Wait! What Is A Graph Anyway? 3. !Social Graph Use Cases Neo Technology, Inc Confidential Thursday, November 6, 14 2

  3. WARNING! ALL I’M OFFERING IS THE TRUTH Neo Technology, Inc Confidential Thursday, November 6, 14 3

  4. Victims Neo Technology, Inc Confidential Thursday, November 6, 14 4

  5. Victims Neo Technology, Inc Confidential Thursday, November 6, 14 5

  6. Context Neo Technology, Inc Confidential Thursday, November 6, 14 6

  7. Neo Technology, Inc Confidential Thursday, November 6, 14 7

  8. Graphs Are Eating The World Neo Technology, Inc Confidential Thursday, November 6, 14 8

  9. C 34,3% B A 38,4% 3,3% F 3,9% D 3,8% E 8,1% 1,8% 1,8% 1,8% 1,8% 1,8% Neo Technology, Inc Confidential Thursday, November 6, 14 9

  10. Neo Technology, Inc Confidential Thursday, November 6, 14 10

  11. Neo Technology, Inc Confidential Thursday, November 6, 14 11

  12. Core industries WEB / ISV Financial Services Tele-communications & Use Cases Network & Data Center Management Master Data Management Social Geo Neo Technology, Inc Confidential Thursday, November 6, 14 12

  13. Core industries WEB / ISV Financial Services Tele-communications & Use Cases & Life Sciences Network & Data Center Finance Management Master Data Management Social GEO Neo Technology, Inc Confidential Thursday, November 6, 14 13

  14. Graphs Are Growin’ Source: http://db-engines.com/en/ranking/graph+dbms ! Neo Technology, Inc Confidential Thursday, November 6, 14 14

  15. Graph Databases In The Enterprise 30% “Forrester estimates that over 25% 25% % of Enterprises using Graph Databases of enterprises will be using graph databases by 2017” 20% “25% of survey respondents said they plan to use Graph databases 10% in the future.” 2.5% Sources • Forrester TechRadar™ : Enterprise DBMS, Feb 13 2014 (http://www.forrester.com/TechRadar+Enterprise 0% +DBMS+Q1+2014/fulltext/-/E-RES106801) 0% • Dataversity Mar 31 2014: “Deconstructing NoSQL: Analysis of a 2013 Survey on the Use, Production and Assessment 2011 2014 2017 Technologies in the Enterprise” (http://www.dataversity.net) of NoSQL • Neo Technology customer base in 2011 and 2014 • Estimation of other graph vendors’ customer base in 2011 and 2014 based on best available intelligence Neo Technology, Inc Confidential Thursday, November 6, 14 15

  16. What Is A Graph, Anyway? Neo Technology, Inc Confidential Thursday, November 6, 14 16

  17. The Property Graph Model Thursday, November 6, 14 17

  18. The Property Graph Model Ann Loves Dan Thursday, November 6, 14 18

  19. The Property Graph Model Loves Ann Dan Thursday, November 6, 14 19

  20. The Property Graph Model Loves Ann Dan (Ann) –[:LOVES]-> (Dan) Thursday, November 6, 14 20

  21. The Property Graph Model Loves Ann Dan (:Person {name:"Ann"}) –[:LOVES]-> (:Person {name:"Dan"}) Thursday, November 6, 14 21

  22. The Property Graph Model Loves Ann Dan (:Person {name:"Ann"}) –[:LOVES]-> (:Person {name:"Dan"}) Node Relationship Node Thursday, November 6, 14 22

  23. Cypher Query: Whom does Ann love? (:Person {name:"Ann"})–[:LOVES]->(whom) Thursday, November 6, 14 23

  24. Cypher Query: Whom does Ann love? MATCH (:Person {name:"Ann"})–[:LOVES]->(whom) Thursday, November 6, 14 24

  25. Cypher Query: Whom does Ann love? MATCH (:Person {name:"Ann"})–[:LOVES]->(whom) RETURN whom Thursday, November 6, 14 25

  26. Neo Technology, Inc Confidential Thursday, November 6, 14 26

  27. MATCH ( me:Person )-[:IS_FRIEND_OF]->(friend:Person), (friend)-[:LIKES]->(restaurant), (restaurant)-[:LOCATED_IN]->( newyork:City ), (restaurant)-[:SERVES]->( sushi:Cuisine ) WHERE me.name = 'Emil' AND newyork.location='New York' AND sushi.cuisine='Sushi' RETURN restaurant.name http://maxdemarzi.com/?s=facebook Neo Technology, Inc Confidential Thursday, November 6, 14 27

  28. Example HR Query (using SQL) *“Find all direct reports and how many they manage, up to 3 levels down” Thursday, November 6, 14 28

  29. Example HR Query (using SQL) (SELECT T.directReportees AS directReportees, sum(T.count) AS count (continued from previous page...) FROM ( SELECT depth1Reportees.pid AS directReportees, SELECT manager.pid AS directReportees, 0 AS count count(depth2Reportees.directly_manages) AS count FROM person_reportee manager FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") JOIN person_reportee L1Reportees UNION ON manager.directly_manages = L1Reportees.pid SELECT manager.pid AS directReportees, count(manager.directly_manages) AS count JOIN person_reportee L2Reportees FROM person_reportee manager ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees GROUP BY directReportees UNION ) AS T SELECT manager.pid AS directReportees, count(reportee.directly_manages) AS count GROUP BY directReportees) FROM person_reportee manager UNION JOIN person_reportee reportee (SELECT T.directReportees AS directReportees, sum(T.count) AS count ON manager.directly_manages = reportee.pid FROM( WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") SELECT reportee.directly_manages AS directReportees, 0 AS count GROUP BY directReportees FROM person_reportee manager UNION JOIN person_reportee reportee SELECT manager.pid AS directReportees, count(L2Reportees.directly_manages) AS count ON manager.directly_manages = reportee.pid FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") JOIN person_reportee L1Reportees GROUP BY directReportees ON manager.directly_manages = L1Reportees.pid UNION JOIN person_reportee L2Reportees SELECT L2Reportees.pid AS directReportees, count(L2Reportees.directly_manages) AS ON L1Reportees.directly_manages = L2Reportees.pid count WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") FROM person_reportee manager GROUP BY directReportees JOIN person_reportee L1Reportees ) AS T ON manager.directly_manages = L1Reportees.pid GROUP BY directReportees) JOIN person_reportee L2Reportees UNION ON L1Reportees.directly_manages = L2Reportees.pid (SELECT T.directReportees AS directReportees, sum(T.count) AS count WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") FROM ( GROUP BY directReportees SELECT manager.directly_manages AS directReportees, 0 AS count ) AS T FROM person_reportee manager GROUP BY directReportees) WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") UNION UNION (SELECT L2Reportees.directly_manages AS directReportees, 0 AS count SELECT reportee.pid AS directReportees, count(reportee.directly_manages) AS count FROM person_reportee manager FROM person_reportee manager JOIN person_reportee L1Reportees JOIN person_reportee reportee ON manager.directly_manages = L1Reportees.pid ON manager.directly_manages = reportee.pid JOIN person_reportee L2Reportees WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") ON L1Reportees.directly_manages = L2Reportees.pid GROUP BY directReportees WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") UNION ) *“Find all direct reports and how many they manage, up to 3 levels down” Thursday, November 6, 14 29

  30. Same Query in Cypher MATCH ¡( boss)-­‑[:MANAGES*0..3]-­‑>(sub), ¡ ¡ ¡ ¡ ¡ ¡(sub)-­‑[:MANAGES*1..3]-­‑>(report) WHERE ¡ boss.name ¡= ¡“John ¡Doe” RETURN ¡sub.name ¡ AS ¡Subordinate, ¡ count (report) ¡ AS ¡Total *“Find all direct reports and how many they manage, up to 3 levels down” Thursday, November 6, 14 30

  31. QUERY TIME DATABASE # PEOPLE (MS) 1,000 2,000 MySQL 1,000 2 Neo4j 1,000,000 2 Neo4j Thursday, November 6, 14 31

  32. M’kay. But what about the Real World(tm)? “Our ¡Neo4j ¡solution ¡is ¡literally ¡ thousands ¡of ¡times ¡ faster ¡than ¡the ¡prior ¡MySQL ¡solution, with ¡queries ¡that ¡require ¡ 10-­‑100 ¡times ¡less ¡code .” -­‑ ¡Volker ¡Pacher, ¡Senior ¡Developer ¡eBay Neo Technology, Inc Confidential Thursday, November 6, 14 32

  33. !Social Graph Use Cases Neo Technology, Inc Confidential Thursday, November 6, 14 33

  34. Network Impact Analysis Neo Technology, Inc Confidential Thursday, November 6, 14 34

  35. Route Finding Neo Technology, Inc Confidential Thursday, November 6, 14 35

  36. Recommendations Neo Technology, Inc Confidential Thursday, November 6, 14 36

  37. Logistics Neo Technology, Inc Confidential Thursday, November 6, 14 37

  38. Access Control Neo Technology, Inc Confidential Thursday, November 6, 14 38

  39. Fraud Detection Neo Technology, Inc Confidential Thursday, November 6, 14 39

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend