Download - Approaching graph db
Approaching Graph databases
Sergey Enin So#ware Engineering Team Leader EPAM, Minsk
NOSQL GRAPH DBs
APP NEO4J
AGENDA
NoSQL
Not Only SQL
NoSQL
NoSQL databases is a special purpose Database
Using specific toolset for specific problem
NoSQL model is different from SQL model
(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
Graph Databases
Graph Databases
Leonhard Euler (1707 –1783) Swiss mathematician
Graph Databases: HISTORY
Graph Databases: HISTORY
What is Graph?
A B
C D
VerKce (Node)
Edge (RelaKonship)
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
ApplicaBon: social graphs
Application: PAGE RANK
APP: Collaborative filtering
Neo4J: CHARACTERISTICS
true ACID transacKons; scales to billions of nodes and relaKonships; high speed querying through traversals; declaraKve 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
RelaKonship
Neo4J: architecture Neo4J: Internal storage
Neo4J: CYPHER
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
Thank You Sergey Enin Software Engineering Team Leader
sergeyenin!
sergeyenin.com/sec2014!
tygrysminsk!
pankrat!