Top Banner
27

Graph database

Jan 27, 2015

Download

Technology

Sergey Enin

Introduction to the applications of graph databases
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Graph database
Page 2: Graph database

Sergey  Enin  

[email protected]  

/pankrat  

/sergeyenin  

Page 3: Graph database

NOSQL  GRAPH  DBs  

APP   NEO4J  

AGENDA

Page 4: Graph database

Graph Databases

Graph  Databases  

Page 5: Graph database

Leonhard Euler (1707 –1783) Swiss mathematician

Graph Databases: HISTORY

Page 6: Graph database

Graph Databases: HISTORY

Page 7: Graph database

What is Graph?

Page 8: Graph database

A   B  

C   D  

Ver%ce  (Node)  

Edge  (Rela%onship)  

Graph Databases: GRAPH

Page 9: Graph database

Graph Databases: WHAT IS IT?

Page 10: Graph database

Graph Databases: WHAT IS IT?

Joins  VS  Traversals  

Page 11: Graph database

Good for semi-structured connected

data

1 Index free-

adjacency

The underlying

storage

The processing

engine

2

3

4

Graph Databases: CHARACTERISTICS

Page 12: Graph database

APPs

Page 13: Graph database

ApplicaFon:  social  graphs  

Page 14: Graph database

Application: PAGE RANK

Page 15: Graph database

APP: Collaborative filtering

Page 16: Graph database
Page 17: Graph database

Neo4J: CHARACTERISTICS

 true  ACID  transac%ons;    scales  to  billions  of  nodes  and  rela%onships;    high  speed  querying  through  traversals;    declara%ve  graph  query  language;  

Page 18: Graph database

Neo4J:   who   use  it  

Neo4J: WHO USE

Page 19: Graph database

Neo4J:  network  architecture  

Neo4J:   who   use  it  

Neo4J: NETWORK ARCHITECTURE

Page 20: Graph database

Neo4J:  architecture  Neo4J: ARCHITECTURE

Page 21: Graph database

Neo4J:  architecture  Neo4J: Internal storage

Node  

Rela%onship  

Page 22: Graph database

Neo4J:  architecture  Neo4J: Internal storage

Page 23: Graph database

APP: Collaborative filtering Neo4J: CF

Page 24: Graph database

APP: Collaborative filtering Neo4J: CF

Page 25: Graph database

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)  

Page 26: Graph database
Page 27: Graph database

[email protected]  

/pankrat  

/sergeyenin  

Thank  you!