modelling data as graphs (neo4j)
DESCRIPTION
Modelling Data in Neo4j for beginners, common mistakes, frequently asked questions, hardware sizing and a few extra tipsTRANSCRIPT
![Page 1: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/1.jpg)
GraphAwareTM
by Michal Bachman
a few best practices and lessons learned
Modelling Data in Neo4j
![Page 2: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/2.jpg)
GraphAwareTM
![Page 3: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/3.jpg)
GraphAwareTM
Ride-sharing website
History of rides
Friendships from Facebook
Aim: build trust between users
Example Domain
![Page 4: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/4.jpg)
GraphAwareTM
There is no single correct way.
Modelling Data as Graphs
![Page 5: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/5.jpg)
GraphAwareTM
Graphs are very whiteboard friendly.
Modelling Data as Graphs
![Page 6: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/6.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
name: “Peter”
User
DROVE
name: “Alice”
User
DROVE
![Page 7: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/7.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
name: “Peter”
User
DROVE
name: “Alice”
User
DROVE
name: “Jenny”
User
DROVE
![Page 8: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/8.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
name: “Peter”
User
DROVE
name: “Alice”
User
DROVE
name: “Jenny”
User
DROVE
date: 2014-01-29date: 2014-01-29date: 2014-01-27
![Page 9: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/9.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
name: “Peter”
User
DROVE
name: “Alice”
User
DROVE
name: “Jenny”
User
DROVE
date: 2014-01-29date: 2014-01-29date: 2014-01-27
RODE_TOGETHER
RODE_TOGETHER
![Page 10: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/10.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
![Page 11: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/11.jpg)
GraphAwareTM
Make important concepts in your domain nodes, you will gain flexibility.
Nodes vs. Relationships
![Page 12: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/12.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
![Page 13: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/13.jpg)
ipsum
FRIEND_OF
name: “Michael”
User
name: “Laura”
User
FRIEND_OF
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
RATEDrating: 5RATED
rating: 3
![Page 14: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/14.jpg)
ipsum
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
RATEDrating: 5RATED
rating: 3
![Page 15: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/15.jpg)
ipsum
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
RATEDrating: 5RATED
rating: 3
![Page 16: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/16.jpg)
GraphAwareTM
a common mistake
Bidirectional Relationships
![Page 17: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/17.jpg)
DEFEATEDCzech Republic
Sweden
GraphAwareTM
Ice Hockey
![Page 18: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/18.jpg)
DEFEATEDCzech Republic
Sweden
GraphAwareTM
Ice Hockey
![Page 19: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/19.jpg)
DEFEATED
Czech Republic
Sweden
DEFEATED_BY
GraphAwareTM
Ice Hockey (Implied Relationship)
![Page 20: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/20.jpg)
DEFEATED
Czech Republic
Sweden
DEFEATED_BY
GraphAwareTM
Ice HockeyIce Hockey (Implied Relationship)
![Page 21: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/21.jpg)
PARTNERNeo Technology GraphAware
PARTNERNeo Technology GraphAware
GraphAwareTM
Company Partnership (Naturally Bidirectional)
![Page 22: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/22.jpg)
PARTNER
Neo Technology GraphAware
PARTNER
GraphAwareTM
Company Partnership (Naturally Bidirectional)
![Page 23: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/23.jpg)
PARTNER
Neo Technology GraphAware
PARTNER
GraphAwareTM
Company Partnership (Naturally Bidirectional)
![Page 24: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/24.jpg)
Neo Technology GraphAware
PARTNER
GraphAwareTM
Company Partnership (Naturally Bidirectional)
![Page 25: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/25.jpg)
Neo Technology GraphAware
PARTNER
GraphAwareTM
Company Partnership (Naturally Bidirectional)
![Page 26: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/26.jpg)
GraphAwareTM
In Neo4j, the speed of traversal does not depend on the direction of the relationships being traversed.
Traversal Speed
![Page 27: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/27.jpg)
GraphAwareTM
Why?
GraphAwareTM
![Page 28: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/28.jpg)
GraphAwareTM
Node Record in the Node Store (9 bytes), first bit = inUse flag
Relationship Record in the Relationship Store (33 bytes), first bit = inUse flag, second bit unused
next relationship
(35 bits)
next property (36 bits)
first node(35 bits)
second node (35 bits)
type(16 bits)
first node's previous
relationship (35 bits)
first node's next
relationship (35 bits)
second node's first relationship
(35 bits)
second node's next relationship
(35 bits)
next property (36 bits)
Neo4j Data Layout
![Page 29: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/29.jpg)
GraphAwareTM
Neo4j APIs allow developers to completely ignore relationship direction when querying the graph.
Traversal APIs
![Page 30: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/30.jpg)
GraphAwareTM
MATCH (neo)-‐[:PARTNER]-‐>(partner)
Cypher
![Page 31: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/31.jpg)
GraphAwareTM
MATCH (neo)<-‐[:PARTNER]-‐(partner)
Cypher
![Page 32: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/32.jpg)
GraphAwareTM
MATCH (neo)-‐[:PARTNER]-‐(partner)
Cypher
![Page 33: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/33.jpg)
GraphAwareTM
Different quality in each direction => should have two relationships!
Heads Up!
LOVES
Geeky Guy Girl
DOESN’T CARE ABOUT
![Page 34: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/34.jpg)
ipsum
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
RATEDrating: 5RATED
rating: 3
![Page 35: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/35.jpg)
ipsum
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
RATEDrating: ?RATED
rating: 3
HATEDDISLIKEDNEUTRALLIKEDLOVED
![Page 36: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/36.jpg)
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
LOVEDNEUTRAL
![Page 37: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/37.jpg)
GraphAwareTM
performance comparison
Qualifying Relationships
![Page 38: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/38.jpg)
ipsum
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
RATEDrating: 5RATED
rating: 3
Qualifying by Properties
![Page 39: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/39.jpg)
GraphAwareTM
START ride=node({id}) MATCH (ride)<-‐[r:RATED]-‐(passenger) WHERE r.rating > 3 RETURN passenger
Who liked the ride? (Cypher)
![Page 40: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/40.jpg)
GraphAwareTM
for (Relationship r : ride.getRelationships(INCOMING, RATED)) { if ((int) r.getProperty("rating") > 3) { Node passenger = r.getStartNode(); //do something with it } }
Who liked the ride? (Java)
![Page 41: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/41.jpg)
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
LOVEDNEUTRAL
Qualifying by Relationship Type
![Page 42: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/42.jpg)
GraphAwareTM
START ride=node({id}) MATCH (ride)<-‐[r:LIKED|LOVED]-‐(passenger) RETURN passenger
Who liked the ride? (Cypher)
![Page 43: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/43.jpg)
GraphAwareTM
for (Relationship r : ride.getRelationships(INCOMING, LIKED, LOVED)) { Node passenger = r.getStartNode(); //do something with it }
Who liked the ride? (Java)
![Page 44: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/44.jpg)
GraphAwareTM
![Page 45: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/45.jpg)
GraphAwareTM
![Page 46: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/46.jpg)
FRIEND_OFname: “Michael”
User
name: “Laura”
User
date: 2014-01-29from: “London”
to: “Nottingham”
RideDRIVER
name: “Alice”
User
PASSENGER
date: 2014-01-27from: “Brighton”
to: “Hastings”
Ride
PASSENGER
name: “Peter”
User
PASSENGER
name: “Jenny”
User
DRIVER
LOVEDNEUTRAL
Winner!
![Page 47: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/47.jpg)
Other interesting info?
![Page 48: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/48.jpg)
GraphAwareTM
frequently asked question
Hardware Sizing
![Page 49: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/49.jpg)
GraphAwareTM
HDD
Record Files
Transaction Log
Operating System
JVM
Neo4j
Object Cache
Core API
Other APIs
TransactionManagement
File System Cache
Node
s
Rela
tions
hips
Prop
ertie
s
Rela
tions
hip
Type
s
Neo4j Architecture
![Page 50: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/50.jpg)
GraphAwareTM
> cd data > ls -‐ah
Disk Space
![Page 51: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/51.jpg)
GraphAwareTM
drwxr-‐xr-‐x 5 bachmanm wheel 170B 19 Oct 12:56 index -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 31K 19 Oct 12:56 messages.log -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 69B 19 Oct 12:56 neostore -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 8.8K 19 Oct 12:56 neostore.nodestore.db -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.nodestore.db.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 39M 19 Oct 12:56 neostore.propertystore.db -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 153B 19 Oct 12:56 neostore.propertystore.db.arrays -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.propertystore.db.arrays.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.propertystore.db.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 43B 19 Oct 12:56 neostore.propertystore.db.index -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.propertystore.db.index.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 140B 19 Oct 12:56 neostore.propertystore.db.index.keys -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.propertystore.db.index.keys.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 154B 19 Oct 12:56 neostore.propertystore.db.strings -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.propertystore.db.strings.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 31M 19 Oct 12:56 neostore.relationshipstore.db -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.relationshipstore.db.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 38B 19 Oct 12:56 neostore.relationshiptypestore.db -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.relationshiptypestore.db.id -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 140B 19 Oct 12:56 neostore.relationshiptypestore.db.names -‐rw-‐r-‐-‐r-‐-‐ 1 bachmanm wheel 9B 19 Oct 12:56 neostore.relationshiptypestore.db.names.id
Disk Space
![Page 52: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/52.jpg)
GraphAwareTM
Disk Space
node 14B
relationship 33B
property 41B
![Page 53: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/53.jpg)
GraphAwareTM
Disk Space (Example)
1,000 nodes x 14B = 13.7 kB1,000,000 rels x 33B = 31.5 MB2,010,000 props x 41B = 78.6 MBTOTAL 110.1 MB
![Page 54: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/54.jpg)
GraphAwareTM
How about low level cache? Any guesses?
Low Level Cache
![Page 55: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/55.jpg)
GraphAwareTM
Same as disk space
Low Level Cache
![Page 56: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/56.jpg)
GraphAwareTM
High Level Cache
node 344B
relationship 208B
property 116B
...
![Page 57: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/57.jpg)
Other interesting info?
![Page 58: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/58.jpg)
GraphAwareTM
Cypher is great!
Cypher is improving
But don’t be afraid of writing some Java
Java API vs. Cypher
![Page 59: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/59.jpg)
GraphAwareTM
Experiment
Measure
Analyse
Ask
Conclusion
![Page 60: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/60.jpg)
GraphAwareTM
www.graphaware.com @graph_aware
Thanks!
![Page 61: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/61.jpg)
GraphAwareTM
Next meetup
• The transport graph – Roads, Nodes and Automobiles (Jacqui Read)
– Transport Network Route Finding Using A Graph (Ian Cartwright & Ben Earlham)
• 26th February 2014 • Here!
![Page 62: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/62.jpg)
GraphAwareTM
![Page 63: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/63.jpg)
GraphAwareTM
Ian Robinson, Jim Webber & Emil Eifrem
Graph Databases
h
Compliments
of Neo Technology
![Page 64: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/64.jpg)
GraphAwareTM
Take me to the pub…
![Page 65: Modelling Data as Graphs (Neo4j)](https://reader034.vdocuments.us/reader034/viewer/2022042606/54795b06b4af9fc9158b47c0/html5/thumbnails/65.jpg)
GraphAwareTM
www.graphaware.com @graph_aware
Thanks!