Upload
sergey-enin
View
126
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Introduction to the applications of graph databases
Citation preview
NOSQL GRAPH DBs
APP NEO4J
AGENDA
Graph Databases
Graph Databases
Leonhard Euler (1707 –1783) Swiss mathematician
Graph Databases: HISTORY
Graph Databases: HISTORY
What is Graph?
A B
C D
Ver%ce (Node)
Edge (Rela%onship)
Graph Databases: GRAPH
Graph Databases: WHAT IS IT?
Graph Databases: WHAT IS IT?
Joins VS Traversals
Good for semi-structured connected
data
1 Index free-
adjacency
The underlying
storage
The processing
engine
2
3
4
Graph Databases: CHARACTERISTICS
APPs
ApplicaFon: social graphs
Application: PAGE RANK
APP: Collaborative filtering
Neo4J: CHARACTERISTICS
true ACID transac%ons; scales to billions of nodes and rela%onships; high speed querying through traversals; declara%ve graph query language;
Neo4J: who use it
Neo4J: WHO USE
Neo4J: network architecture
Neo4J: who use it
Neo4J: NETWORK ARCHITECTURE
Neo4J: architecture Neo4J: ARCHITECTURE
Neo4J: architecture Neo4J: Internal storage
Node
Rela%onship
Neo4J: architecture Neo4J: Internal storage
APP: Collaborative filtering Neo4J: CF
APP: Collaborative filtering Neo4J: CF
Neo4J: CYPHER
MATCH (p1:Person)-‐[x:RATED]-‐>(m:PRODUCT)<-‐[y:RATED]-‐
(p2:Person) WITH
SUM(x.ra%ng * y.ra%ng) AS xyDotProduct, SQRT(REDUCE(xDot = 0, a IN COLLECT(x.ra%ng) | xDot + a^2)) AS xLength, SQRT(REDUCE(yDot = 0, b IN COLLECT(y.ra%ng) | yDot + b^2)) AS yLength, p1, p2 CREATE UNIQUE
(p1)-‐[s:SIMILARITY]-‐(p2) SET
s.similarity = xyDotProduct / (xLength * yLength)