intro to neo4j for developers
play

Intro to Neo4j for Developers Jennifer Reif Developer Relations - PowerPoint PPT Presentation

Intro to Neo4j for Developers Jennifer Reif Developer Relations Engineer, Neo4j jennifer.reif@neo4j.com @JMHReif Who Am I? Developer Relations Engineer for Neo4j Continuous learner Conference speaker Tech blogger Hobbies:


  1. Intro to Neo4j for Developers Jennifer Reif Developer Relations Engineer, Neo4j jennifer.reif@neo4j.com @JMHReif

  2. Who Am I? • Developer Relations Engineer for Neo4j • Continuous learner • Conference speaker • Tech blogger • Hobbies: cats, co ff ee, horses, traveling Email: jennifer.reif@neo4j.com Twitter: @JMHReif

  3. What is a graph? • Set of discrete objects, each of which has some set of relationships with other objects Seven Bridges of Konigsberg problem. Leonhard Euler, 1735

  4. What does graph have to offer?

  5. Show how data is connected

  6. Relational Graph

  7. Other NoSQL Graph

  8. Graphs add context and meaning

  9. A few graph use cases… Social network Fraud detection Network & IT operations Identity & access management Graph-based search

  10. (Graphs)-[ARE]->(Everywhere) The Internet Bank Fraud

  11. Literally… Game of Thrones family trees NASA space satellite

  12. Neo4j is a graph database

  13. Neo4j is a database Reliable ACID transactions Neo4j

  14. Neo4j is a database Reliable ACID transactions Neo4j Clustering scale & availability

  15. Neo4j is a database Binary & HTTP Reliable protocol Official Drivers ACID transactions Neo4j Clustering scale & availability

  16. Neo4j is a graph database Graph Storage Neo4j Native Graph Engine Schema Free

  17. Neo4j is a graph database Graph Storage Property Graph Neo4j Model Native Graph Engine Schema Free

  18. Whiteboard Friendliness Easy to design and model direct representation of the model

  19. Whiteboard friendliness

  20. Whiteboard friendliness Movie Character APPEARS_IN title: The Lord of the Rings… name: Frodo Baggins released: 2003 N I _ S PLAYED APPEARS_IN R A Cast E P P A name: Elijah Wood Character name: Aragorn Character name: Legolas PLAYED Cast P L A Y name: Orlando Bloom E D Cast name: Viggo Mortensen

  21. Whiteboard friendliness

  22. How to construct a graph

  23. Property graph data model • 2 main components: • Nodes • Relationships • Additional components: • Labels • Properties

  24. Property graph data model • Nodes Person • Represent the objects in the graph • Can be categorized using Labels Technology Company Person

  25. Property graph data model • Nodes Person • Represent the objects in the graph • Can be categorized using Labels :IS_FRIENDS_WITH • Relationships • Relate nodes by type and Technology Company direction :LIKES :WORKS_FOR Person

  26. Property graph data model • Nodes Person • Represent the objects in the graph name: Michael • Can be categorized using Labels :IS_FRIENDS_WITH since: 2018 • Relationships • Relate nodes by type and Technology Company type: Graphs name: Neo4j direction • Properties • Name/value pairs that can be :LIKES :WORKS_FOR applied to nodes or relationships Person name: Jennifer

  27. Neo4j is a graph database Graph Storage Property Graph Neo4j Model Native Graph Extensible Engine Procedures & Functions Cypher Schema Query Free Language

  28. Cypher Query Language… SQL for Graphs

  29. Functional and visual • Based on ASCII-art LIKES A B • Declarative query language MATCH ( A ) - [ : LIKES] - > ( B ) • Focuses on what to retrieve, not how

  30. Cypher: powerful and expressive WORKS_FOR Neo4j Jennifer NODE NODE CREATE (:Person { name: ‘Jennifer’}) -[:WORKS_FOR]-> (:Company { name: ‘Neo4j’}) LABEL LABEL PROPERTY PROPERTY

  31. Cypher: powerful and expressive WORKS_FOR Neo4j Jennifer MATCH (:Person { name: ‘Jennifer’} ) -[:WORKS_FOR]-> ( whom ) 
 RETURN whom

  32. Neo4j is a graph database Tools & Graph Libraries Storage Property Graph Graph Neo4j Visualization Model Native Graph Extensible Engine Procedures & Functions Cypher Schema Query Free Language

  33. Lord of the Rings graph

  34. Demo Time!!

  35. Resources • Neo4j download: neo4j.com/download/ • Neo4j sandbox: neo4j.com/sandbox/ • Developer guides: neo4j.com/developer/get-started/ • Cypher: neo4j.com/developer/cypher • Data import: neo4j.com/developer/data-import/ • Neo4j certification: neo4j.com/graphacademy/neo4j-certification/ @JMHReif jennifer.reif@neo4j.com

  36. Hunger Games Questions for “Introduction to Neo4j for Developers” 1. Easy: What is Neo4j’s query language? a. GQL b. Cypher c. Gremlin 2. Medium: What graph data model does Neo4j use? a. Short answer: ______________________ 3. Hard: On Jennifer’s data, what did this Cypher clause tell us? WHERE size((a)-[:PLAYED]->(:Character)) > 1 b. Ignore Actors who played more than 1 Character c. Retrieve how many Cast members played a Character d. Find patterns where Cast members played more than 1 Character Answer here: r.neo4j.com/hunger-games

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