Tackling	  Complex	  Data	  with	                    Neo4j              	                   @ianSrobinson	  ian.robinson@n...
Outline	  •    Data	  complexity	  •    Graph	  databases	  –	  features	  and	  benefits	  •    Querying	  graph	  data	  ...
Data	  Complexity	  complexity = f(size, semi-structure, connectedness)                                        #neo4j	  
Data	  Complexity	  complexity = f(size   , semi-structure, connectedness)                                                ...
Semi-­‐Structure	                         #neo4j	  
Semi-­‐Structure	   USER_ID	   FIRST_NAME	   LAST_NAME	            EMAIL_1	                    EMAIL_2	          FACEBOOK	...
Connectedness	                      #neo4j	  
#neo4j	  
#neo4j	  
#neo4j	  
#neo4j	  
#neo4j	  
#neo4j	  
#neo4j	  
Graphs	  Are	  Everywhere	                             #neo4j	  
#neo4j	  
Neo4j	  is	  a	  Graph	  Database	  •  Store	  •  Manage	  •  Query	                 data	            as	  a	  graph	     ...
Property	  Graph	  Data	  Model	                                 #neo4j	  
Graph	  Database	  Benefits	  “Minutes	  to	  milliseconds”	  performance	    •  Millions	  of	  ‘joins’	  per	  second	   ...
Querying	  Graph	  Data	  •  Describing	  graphs	  •  Crea`ng	  nodes,	  rela`onships	  and	  proper`es	  •  Querying	  gr...
Describing	  Graphs	                         #neo4j	  
Cypher	  (graphs)<-[:INTERESTED_IN]-(ben)-[:INTERESTED_IN]->(rest),	(ben)-[:WORKS_FOR]->(acme)	                           ...
Cypher	  (ben)-[:INTERESTED_IN]->(graphs),	(ben)-[:INTERESTED_IN]->(rest),	(ben)-[:WORKS_FOR]->(acme)	                    ...
Create	  Some	  Data	  CREATE ben = { name : Ben },	       acme = { name : Acme },	       rest = { name : REST },	       g...
Create	  Nodes	  CREATE ben = { name : Ben },	       acme = { name : Acme },	       rest = { name : REST },	       graphs ...
Create	  Rela`onships	  CREATE ben = { name : Ben },	       acme = { name : Acme },	       rest = { name : REST },	       ...
Return	  Node	  CREATE ben = { name : Ben },	       acme = { name : Acme },	       rest = { name : REST },	       graphs =...
Eventually…	                    #neo4j	  
Querying	  a	  Graph	  Graph	  local:	  •  One	  or	  more	  start	  nodes	  •  Explore	  surrounding	  graph	  •  Million...
Queries:	  Padern	  Matching	  Padern	                                    #neo4j	  
Start	  Node	  Padern	                                   #neo4j	  
Match	  Padern	                           #neo4j	  
Match	  Padern	                           #neo4j	  
Match	  Padern	                           #neo4j	  
Non-­‐Match	  Padern	                                 #neo4j	  
Non-­‐Match	  Padern	                                 #neo4j	  
Colleagues	  Who	  Share	  My	  Interests	                                        #neo4j	  
Cypher	  Padern	  me-[:INTERESTED_IN]->topic,	me-[:WORKS_FOR]->company,	colleague-[:INTERESTED_IN]->topic, 	colleague-[:WO...
Find	  Colleagues	  START    me=node:users(name = "sarah")	MATCH    me-[:INTERESTED_IN]->topic,	         me-[:WORKS_FOR]->...
Find	  Start	  Node	  START    me=node:users(name = "sarah")	MATCH    me-[:INTERESTED_IN]->topic,	         me-[:WORKS_FOR]...
Describe	  Padern	  START    me=node:users(name = "sarah")	MATCH    me-[:INTERESTED_IN]->topic,	         me-[:WORKS_FOR]->...
Construct	  Results	  START    me=node:users(name = "sarah")	MATCH    me-[:INTERESTED_IN]->topic,	         me-[:WORKS_FOR]...
Case	  Studies	                        #neo4j	  
Network	  Impact	  Analysis	  •  Which	  parts	  of	  network	     does	  a	  customer	     depend	  on?	  •  Who	  will	 ...
Asset	  Management	  &	  Access	  Control	  •  Which	  assets	  can	  an	     admin	  control?	  •  Who	  can	  change	  m...
Logis`cs	  •  What’s	  the	  quickest	     delivery	  route	  for	  this	     parcel?	                                    ...
Social	  Network	  &	  Recommenda`ons	  •  Which	  assets	  can	  I	     access?	  •  Who	  shares	  my	     interests?	  ...
Community	         Advanced	                          Enterprise	  hdp://neo4j.org/download/	                             ...
Thank	  You      	                   @iansrobinson	  ian.robinson@neotechnology.com	                                	     ...
Upcoming SlideShare
Loading in …5
×

Tackling Complex Data with Neo4j by Ian Robinson

859 views
721 views

Published on

Today's complex data is not only big, but also semi-structured and densely connected. In this session we'll look at how size, structure and connectedness have converged to change the data world. We'll then go on to look at some of the new opportunities for creating end-user value that have emerged in a world of connected data, illustrated with practical examples implemented using Neo4j, the world's leading graph database.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
859
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Tackling Complex Data with Neo4j by Ian Robinson

  1. 1. Tackling  Complex  Data  with   Neo4j   @ianSrobinson  ian.robinson@neotechnology.com     #neo4j  
  2. 2. Outline  •  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  
  17. 17. Neo4j  is  a  Graph  Database  •  Store  •  Manage  •  Query   data   as  a  graph   #neo4j  
  18. 18. Property  Graph  Data  Model   #neo4j  
  19. 19. Graph  Database  Benefits  “Minutes  to  milliseconds”  performance   •  Millions  of  ‘joins’  per  second   •  Consistent  query  `mes  as  dataset  grows  Fit  for  the  domain   •  Lots  of  join  tables?  Connectedness   •  Lots  of  sparse  tables?  Semi-­‐structure  Business  responsiveness   •  Easy  to  evolve   #neo4j  
  20. 20. Querying  Graph  Data  •  Describing  graphs  •  Crea`ng  nodes,  rela`onships  and  proper`es  •  Querying  graphs   #neo4j  
  21. 21. Describing  Graphs   #neo4j  
  22. 22. Cypher  (graphs)<-[:INTERESTED_IN]-(ben)-[:INTERESTED_IN]->(rest), (ben)-[:WORKS_FOR]->(acme) #neo4j  
  23. 23. Cypher  (ben)-[:INTERESTED_IN]->(graphs), (ben)-[:INTERESTED_IN]->(rest), (ben)-[:WORKS_FOR]->(acme) #neo4j  
  24. 24. Create  Some  Data  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { name : REST }, graphs = { name : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  25. 25. Create  Nodes  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { name : REST }, graphs = { name : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  26. 26. Create  Rela`onships  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { name : REST }, graphs = { name : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  27. 27. Return  Node  CREATE ben = { name : Ben }, acme = { name : Acme }, rest = { name : REST }, graphs = { name : Graphs }, ben-[:WORKS_FOR]->acme, ben-[:INTERESTED_IN]->rest, ben-[:INTERESTED_IN]->graphs RETURN ben #neo4j  
  28. 28. Eventually…   #neo4j  
  29. 29. Querying  a  Graph  Graph  local:  •  One  or  more  start  nodes  •  Explore  surrounding  graph  •  Millions  of  joins  per  second   #neo4j  
  30. 30. Queries:  Padern  Matching  Padern   #neo4j  
  31. 31. Start  Node  Padern   #neo4j  
  32. 32. Match  Padern   #neo4j  
  33. 33. Match  Padern   #neo4j  
  34. 34. Match  Padern   #neo4j  
  35. 35. Non-­‐Match  Padern   #neo4j  
  36. 36. Non-­‐Match  Padern   #neo4j  
  37. 37. Colleagues  Who  Share  My  Interests   #neo4j  
  38. 38. Cypher  Padern  me-[:INTERESTED_IN]->topic, me-[:WORKS_FOR]->company, colleague-[:INTERESTED_IN]->topic, colleague-[:WORKS_FOR]->company #neo4j  
  39. 39. 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.name) AS interests ORDER BY score DESC #neo4j  
  40. 40. 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.name) AS interests ORDER BY score DESC #neo4j  
  41. 41. Describe  Padern  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.name) AS interests ORDER BY score DESC #neo4j  
  42. 42. 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.name) AS interests ORDER BY score DESC #neo4j  
  43. 43. Case  Studies   #neo4j  
  44. 44. Network  Impact  Analysis  •  Which  parts  of  network   does  a  customer   depend  on?  •  Who  will  be  affected  if   we  replace  a  network   element?   #neo4j  
  45. 45. Asset  Management  &  Access  Control  •  Which  assets  can  an   admin  control?  •  Who  can  change  my   subscrip`on?   #neo4j  
  46. 46. Logis`cs  •  What’s  the  quickest   delivery  route  for  this   parcel?   #neo4j  
  47. 47. Social  Network  &  Recommenda`ons  •  Which  assets  can  I   access?  •  Who  shares  my   interests?   #neo4j  
  48. 48. Community   Advanced   Enterprise  hdp://neo4j.org/download/   #neo4j  
  49. 49. Thank  You   @iansrobinson  ian.robinson@neotechnology.com     #neo4j  

×