Approaching graph db

29
Approaching Graph databases

description

People like graphs. In nowadays they use facebook social graph search to find ex-girlfriend/boyfriends of their sweet hearts, or to search for a new love. Moreover - companies use graphs to evaluate the internal communication effectiveness or to design the enterprise network scheme. In all those tasks the simple questions arise - what type of data storage should be used to solve the problem in the most effective and easy? Graph databases!

Transcript of Approaching graph db

Page 1: Approaching graph db

Approaching Graph databases

Page 2: Approaching graph db

Sergey  Enin  So#ware  Engineering  Team  Leader  EPAM,  Minsk  

Page 3: Approaching graph db

NOSQL   GRAPH  DBs  

APP   NEO4J  

AGENDA

Page 4: Approaching graph db

NoSQL

Page 5: Approaching graph db

Not Only SQL

NoSQL

NoSQL  databases  is  a  special  purpose  Database    

Using  specific  toolset  for  specific  problem  

NoSQL  model  is  different  from  SQL  model  

Page 6: Approaching graph db

(No)SQL: CLASSIFICATION

Database   Data  model   Strengths   Weaks  

MySQL   RelaBonal   E-­‐R  data  model   Low  flexibility  

Redis   Key-­‐value   High  performance  and  scalability  

Low  funcKonality  

MongoDB   Document   High  performance  

Variable  flexibility  

Cassandra   Column   High  performance  and  scalability  

Low  funcKonality  

Neo4j   Graph   High  performance  

High  complexity  

Page 7: Approaching graph db

Graph Databases

Graph  Databases  

Page 8: Approaching graph db

Leonhard Euler (1707 –1783) Swiss mathematician

Graph Databases: HISTORY

Page 9: Approaching graph db

Graph Databases: HISTORY

Page 10: Approaching graph db

What is Graph?

Page 11: Approaching graph db

A   B  

C   D  

VerKce  (Node)  

Edge  (RelaKonship)  

Graph Databases: GRAPH

Page 12: Approaching graph db

Graph Databases: WHAT IS IT?

Page 13: Approaching graph db

Graph Databases: WHAT IS IT?

Joins  VS  Traversals  

Page 14: Approaching graph db

Good for semi-structured connected

data

1 Index free-

adjacency

The underlying

storage

The processing

engine

2

3

4

Graph Databases: CHARACTERISTICS

Page 15: Approaching graph db

APPs

Page 16: Approaching graph db

ApplicaBon:  social  graphs  

Page 17: Approaching graph db

Application: PAGE RANK

Page 18: Approaching graph db

APP: Collaborative filtering

Page 19: Approaching graph db
Page 20: Approaching graph db

Neo4J: CHARACTERISTICS

 true  ACID  transacKons;    scales  to  billions  of  nodes  and  relaKonships;    high  speed  querying  through  traversals;    declaraKve  graph  query  language;  

Page 21: Approaching graph db

Neo4J:   who   use  it  

Neo4J: WHO USE

Page 22: Approaching graph db

Neo4J:  network  architecture  

Neo4J:   who   use  it  

Neo4J: NETWORK ARCHITECTURE

Page 23: Approaching graph db

Neo4J:  architecture  Neo4J: ARCHITECTURE

Page 24: Approaching graph db

Neo4J:  architecture  Neo4J: Internal storage

Node  

RelaKonship  

Page 25: Approaching graph db

Neo4J:  architecture  Neo4J: Internal storage

Page 26: Approaching graph db

Neo4J: CYPHER

Page 27: Approaching graph db

START      usa=node:mb_fulltext(name="United  States"),    gb=node:mb_fulltext(name="United  Kingdom")  

MATCH      (usa:Country),  (gb:Country),    (arKst:ArKst)-­‐[:FROM_AREA]-­‐(usa),    (arKst:ArKst)-­‐[:RECORDING_CONTRACT]-­‐(l:Label),    (label)-­‐[:FROM_AREA]-­‐(gb)  

RETURN      arKst,label,usa,gb  

Neo4J: CYPHER

Page 28: Approaching graph db
Page 29: Approaching graph db

Thank You Sergey Enin Software Engineering Team Leader

[email protected]!

sergeyenin!

sergeyenin.com/sec2014!

tygrysminsk!

pankrat!