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

intro to neo4j for developers
SMART_READER_LITE
LIVE PREVIEW

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:


slide-1
SLIDE 1

Intro to Neo4j for Developers

Jennifer Reif

Developer Relations Engineer, Neo4j jennifer.reif@neo4j.com @JMHReif

slide-2
SLIDE 2

Who Am I?

  • Developer Relations Engineer for Neo4j
  • Continuous learner
  • Conference speaker
  • Tech blogger
  • Hobbies: cats, coffee, horses, traveling

Email: jennifer.reif@neo4j.com Twitter: @JMHReif

slide-3
SLIDE 3

What is a graph?

  • Set of discrete objects, each of which has some set of relationships with
  • ther objects

Seven Bridges of Konigsberg problem. Leonhard Euler, 1735

slide-4
SLIDE 4

What does graph have to offer?

slide-5
SLIDE 5

Show how data is connected

slide-6
SLIDE 6

Relational Graph

slide-7
SLIDE 7

Other NoSQL Graph

slide-8
SLIDE 8
slide-9
SLIDE 9

Graphs add context and meaning

slide-10
SLIDE 10

A few graph use cases…

Social network Fraud detection Network & IT operations Identity & access management Graph-based search

slide-11
SLIDE 11

(Graphs)-[ARE]->(Everywhere)

The Internet Bank Fraud

slide-12
SLIDE 12

Literally…

NASA space satellite Game of Thrones family trees

slide-13
SLIDE 13

Neo4j is a graph database

slide-14
SLIDE 14

Neo4j is a database

Neo4j

Reliable ACID transactions

slide-15
SLIDE 15

Neo4j is a database

Neo4j

Reliable ACID transactions Clustering scale & availability

slide-16
SLIDE 16

Neo4j is a database

Neo4j

Reliable Binary & HTTP protocol ACID transactions Clustering scale & availability Official Drivers

slide-17
SLIDE 17

Neo4j is a graph database

Neo4j

Native Graph Engine Graph Storage Schema Free

slide-18
SLIDE 18

Neo4j is a graph database

Neo4j

Property Graph Model Native Graph Engine Schema Free Graph Storage

slide-19
SLIDE 19

Whiteboard Friendliness

Easy to design and model direct representation of the model

slide-20
SLIDE 20

Whiteboard friendliness

slide-21
SLIDE 21

Whiteboard friendliness

title: The Lord of the Rings… released: 2003 Movie Cast name: Orlando Bloom name: Frodo Baggins Character

PLAYED APPEARS_IN

name: Elijah Wood Cast Character name: Legolas Character name: Aragorn name: Viggo Mortensen Cast

P L A Y E D PLAYED A P P E A R S _ I N APPEARS_IN

slide-22
SLIDE 22

Whiteboard friendliness

slide-23
SLIDE 23

How to construct a graph

slide-24
SLIDE 24

Property graph data model

  • 2 main components:
  • Nodes
  • Relationships
  • Additional components:
  • Labels
  • Properties
slide-25
SLIDE 25

Property graph data model

  • Nodes
  • Represent the objects in the graph
  • Can be categorized using Labels

Person Person Company Technology

slide-26
SLIDE 26

Property graph data model

  • Nodes
  • Represent the objects in the graph
  • Can be categorized using Labels
  • Relationships
  • Relate nodes by type and

direction

Person Person Company Technology

:LIKES :IS_FRIENDS_WITH :WORKS_FOR

slide-27
SLIDE 27

Property graph data model

  • Nodes
  • Represent the objects in the graph
  • Can be categorized using Labels
  • Relationships
  • Relate nodes by type and

direction

  • Properties
  • Name/value pairs that can be

applied to nodes or relationships

:LIKES :IS_FRIENDS_WITH :WORKS_FOR

Person

name: Michael

Person

name: Jennifer

Technology

type: Graphs since: 2018

Company

name: Neo4j

slide-28
SLIDE 28

Neo4j is a graph database

Neo4j

Property Graph Model Native Graph Engine Schema Free Graph Storage Cypher Query Language Extensible Procedures & Functions

slide-29
SLIDE 29

Cypher Query Language…

SQL for Graphs

slide-30
SLIDE 30

Functional and visual

  • Based on ASCII-art
  • Declarative query language
  • Focuses on what to retrieve, not how

A B LIKES

MATCH ( A ) - [ : LIKES] - > ( B )

slide-31
SLIDE 31

Cypher: powerful and expressive

Jennifer Neo4j

WORKS_FOR

CREATE (:Person { name: ‘Jennifer’}) -[:WORKS_FOR]-> (:Company { name: ‘Neo4j’})

LABEL PROPERTY NODE NODE LABEL PROPERTY

slide-32
SLIDE 32

Cypher: powerful and expressive

Jennifer Neo4j

WORKS_FOR

MATCH (:Person { name: ‘Jennifer’} ) -[:WORKS_FOR]-> ( whom ) 
 RETURN whom

slide-33
SLIDE 33

Neo4j is a graph database

Neo4j

Property Graph Model Native Graph Engine Schema Free Graph Storage Cypher Query Language Tools & Libraries Extensible Procedures & Functions Graph Visualization

slide-34
SLIDE 34

Lord of the Rings graph

slide-35
SLIDE 35

Demo Time!!

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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?
  • 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

WHERE size((a)-[:PLAYED]->(:Character)) > 1