OWF12/Java Ian robinson

1,334 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,334
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

OWF12/Java Ian robinson

  1. 1. New  Opportuni0es  for   Connected  Data   @ianSrobinson  ian.robinson@neotechnology.com     #neo4j  
  2. 2. Agenda  •  Data  complexity  •  Graph  databases  –  features  and  benefits  •  Querying  graph  data  •  Use  cases   #neo4j  
  3. 3. Data  Complexity  complexity = f(size, semi-structure, connectedness) #neo4j  
  4. 4. Data  Complexity  complexity = f(size , semi-structure, connectedness) #neo4j  
  5. 5. Semi-­‐Structure   #neo4j  
  6. 6. Semi-­‐Structure   USER_ID   FIRST_NAME   LAST_NAME   EMAIL_1   EMAIL_2   FACEBOOK   TWITTER   SKYPE   315   Ian   Robinson   ian@neotechnology.com   iansrobinson@gmail.com   NULL   @iansrobinson   iansrobinson  Email:  ian@neotechnology.com  Email:  iansrobinson@gmail.com   CONTACT  Twi*er:  @iansrobinson   0..n  Skype:  iansrobinson   USER   CONTACT_TYPE   #neo4j  
  7. 7. Connectedness   #neo4j  
  8. 8. #neo4j  
  9. 9. #neo4j  
  10. 10. #neo4j  
  11. 11. #neo4j  
  12. 12. #neo4j  
  13. 13. #neo4j  
  14. 14. #neo4j  
  15. 15. Graphs  Are  Everywhere   #neo4j  
  16. 16. Neo4j  is  a  Graph  Database  •  Store  •  Manage  •  Query   data   as  a  graph   #neo4j  
  17. 17. Property  Graph  Data  Model   #neo4j  
  18. 18. Graph  Database  Benefits  Densely-­‐connected,  semi-­‐structured  domains   •  Lots  of  join  tables?  Connectedness   •  Lots  of  sparse  tables?  Semi-­‐structure  Data  Model  Vola=lity   •  Easy  to  evolve  Join  Complexity  and  Performance   •  Millions  of  ‘joins’  per  second   •  Consistent  query  0mes  as  dataset  grows   #neo4j  
  19. 19. Querying  Graph  Data  •  A  language  for  describing  graphs  •  Crea0ng  nodes,  rela0onships  and  proper0es  •  Querying  data   #neo4j  
  20. 20. Describing  Graphs   #neo4j  
  21. 21. Cypher  (graphs)<-[:INTERESTED_IN]-(ben)-[:INTERESTED_IN]->(rest), (ben)-[:WORKS_FOR]->(acme) #neo4j  
  22. 22. Cypher  (ben)-[:INTERESTED_IN]->(graphs), (ben)-[:INTERESTED_IN]->(rest), (ben)-[:WORKS_FOR]->(acme) #neo4j  
  23. 23. Create  Some  Data  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { label : REST }, graphs = { label : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  24. 24. Create  Nodes  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { label : REST }, graphs = { label : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  25. 25. Create  Rela0onships  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { label : REST }, graphs = { label : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  26. 26. Return  Node  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { label : REST }, graphs = { label : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  27. 27. Eventually…   #neo4j  
  28. 28. Querying  a  Graph  Graph  local:  •  One  or  more  start  nodes  •  Explore  surrounding  graph  •  Millions  of  joins  per  second   #neo4j  
  29. 29. Queries:  Pacern  Matching  Pacern   #neo4j  
  30. 30. Start  Node  Pacern   #neo4j  
  31. 31. Match  Pacern   #neo4j  
  32. 32. Match  Pacern   #neo4j  
  33. 33. Match  Pacern   #neo4j  
  34. 34. Non-­‐Match  Pacern   #neo4j  
  35. 35. Non-­‐Match  Pacern   #neo4j  
  36. 36. Colleagues  Who  Share  My  Interests   #neo4j  
  37. 37. Cypher  Pacern  me-[:INTERESTED_IN]->topic, me-[:WORKS_FOR]->company, colleague-[:INTERESTED_IN]->topic, colleague-[:WORKS_FOR]->company #neo4j  
  38. 38. Find  Colleagues  START me=node:users(name = "sarah") MATCH me-[:INTERESTED_IN]->topic, me-[:WORKS_FOR]->company, colleague-[:INTERESTED_IN]->topic, colleague-[:WORKS_FOR]->company RETURN colleague.name AS name, count(topic) AS score, collect(topic.label) AS interests ORDER BY score DESC #neo4j  
  39. 39. Find  Start  Node  START me=node:users(name = "sarah") MATCH me-[:INTERESTED_IN]->topic, me-[:WORKS_FOR]->company, colleague-[:INTERESTED_IN]->topic, colleague-[:WORKS_FOR]->company RETURN colleague.name AS name, count(topic) AS score, collect(topic.label) AS interests ORDER BY score DESC #neo4j  
  40. 40. Describe  Pacern  START me=node:users(name = "sarah") MATCH me-[:INTERESTED_IN]->topic, me-[:WORKS_FOR]->company, colleague-[:INTERESTED_IN]->topic, colleague-[:WORKS_FOR]->company RETURN colleague.name AS name, count(topic) AS score, collect(topic.label) AS interests ORDER BY score DESC #neo4j  
  41. 41. Construct  Results  START me=node:users(name = "sarah") MATCH me-[:INTERESTED_IN]->topic, me-[:WORKS_FOR]->company, colleague-[:INTERESTED_IN]->topic, colleague-[:WORKS_FOR]->company RETURN colleague.name AS name, count(topic) AS score, collect(topic.label) AS interests ORDER BY score DESC #neo4j  
  42. 42. Case  Studies   #neo4j  
  43. 43. Network  Impact  Analysis  •  Which  parts  of  network   does  a  customer   depend  on?  •  Who  will  be  affected  if   we  replace  a  network   element?   #neo4j  
  44. 44. Asset  Management  &  Access  Control  •  Which  assets  can  an   admin  control?  •  Who  can  change  my   subscrip0on?   #neo4j  
  45. 45. Logis0cs  •  What’s  the  quickest   delivery  route  for  this   parcel?   #neo4j  
  46. 46. Social  Network  &  Recommenda0ons  •  Which  assets  can  I   access?  •  Who  shares  my   interests?   #neo4j  
  47. 47. Thank  You   @iansrobinson  ian.robinson@neotechnology.com     #neo4j  
  48. 48. Graph  Databases  na0ve   Graph  Processing   FlockDB AllegroGraphnon-­‐na0ve   Graph  Storage   na0ve   #neo4j  
  49. 49. RDF  Triples   #neo4j  
  50. 50. Hypergraph   #neo4j  

×