Download - Graph databases
2
Overview of NoSQL
What is a Graph Database
Concept
Some Use Cases
Conclusion
Agenda
3
Overview of NoSQL
NoSQLNot Only SQL
4
Types of NoSQL
Key Value Stores Column Family Document Databases Graph Databases
5
Key-Value StoreTypes of NoSQL
Based on Amazon’s Dynamo platform: Highly Available Key-Value StoreData Model:
Global key-value mappingBig scalable HashMapHighly fault tolerant
Examples:Redis, Riak, Voldemort, Tokyo
6
Column Family NoSQL Types
Based on BigTable: Google’s Distributed Storage System for Structured DataData Model:
A big table, with column familiesMap Reduce for querying/processingEvery row can have its own Schema
Examples:HBase, HyperTable, Cassandra
7
Document DatabasesNoSQL Types
Based on Lotus NotesData Model:
A collection of documentsA document is a key value collectionIndex-centric, lots of map-reduce
Examples:CouchDB, MongoDB
8
Graph DatabasesNoSQL Types
Based on Euler & Graph TheoryData Model:
Nodes and Relationships
Examples:Neo4j, OrientDB, InfiniteGraph, AllegroGraph, Titan
9
NoSQL PerformaceComplexity vs Size
Data Size
Dat
a C
ompl
exity
RDBMS
K-V Store
CF Store
Document Store
GraphStore
………………..
What is a Graph?
An abstract representation of a set of objects where some pairs are connected by links.
Object (Vertex, Node)
Link (Edge, Arc, Relationship)
Name
Different Types of Graphs
Graph Type Diagram
Undirected Graph
Directed Graph
Pseudo Graph
Multi Graph
Hyper Graph
Different Types of Graphs
Graph Type Diagram
Weighted Graph
Labeled Graph
Property Graph
What is a Graph Database?
A database with an explicit graph structureEach node knows its adjacent nodes Even as the number of nodes increases, the cost of a local step (or hop) remains the samePlus an Index for lookupsTransactional based
Compared to Relational Databases
Optimized for aggregation Optimized for connections
Compared to Key Value Stores
Optimized for simple look-ups Optimized for traversing connected data
Compared to Key Value Stores
Optimized for “trees” of data Optimized for seeing the forest and the trees, and the branches, and the trunks
17
Friends RecommendationWondered How ?
18
Graph DatabasesBasic Concepts – Social Data
1
3
2
6 12
9
FRIENDFRIEND
FRIEND
RELATED
FRIEND
Name= “Vinoth”City= “PF “
Name= “Thomas”
City= “Wimsheim”
Name= “Elena”
Name= “Joachim” Name= “Emanuel”
Name= “Y”
FRIEND
Since : 2012
19
Graph Search Feature of FBWondered How ?
20
Graph DatabasesBasic Concepts – Connection based
1
3
2
6
WORKSFRIEND
FRIEND
Name= “Vinoth”
City= “PF”
Name= “Thomas”
City= “Wimsheim”
Name= “Elena”
FRIEND
Since : 2012
Name= “WIDAS”
21
Graph DatabasesBasic Concepts – Spatial Data
1
3
2
6 12
9
ROAD
ROAD
ROAD
ROAD
ROAD
Name= “WIDAS”Lat = 48.510Lon = 8.790
ROAD
Name= “Pforzheim Cafe”Lat = 48.530Lon = 8.420
Name= “Stuttgart Hbf”Lat = 48.460Lon = 9.1040
distance: 24 kmName= “…..”Lat = 41.000Lon = 9.840
distance: 51 km
distance: 12 km
22
Power of Graph Database
Social Data
Spatial Data
+
23
Graph DatabasesBasic Concepts – Social and Spatial Data
1
3
2
6 12
LIKES
ROAD
FRIENDS
ROAD
Name= “WIDAS”Lat = 41.000Lon = 40.840
ROAD
distance: 12 km
Name= “Pforzheim”Lat = 41.000Lon = 40.840
Name= “Stuttgart”Lat = 41.000Lon = 40.840
distance: 24 km Name= ThomasTravel_rating = expert
distance: 51 km
Name= ElenaTravel_rating = novice
Some Use Cases
Highly connected data (social networks)Recommendations (e-commerce)Path Finding (how do I know you?)Anamoly Detection (Financial Services)
25
FDS System with GraphDB
1
Name= “Vinoth”
IBAN= “DE1234”
WITHDRAWS3
Name= “ATM@Romania”Lat = 41.000Lon = 40.840
2
LIVES
Name= “Pforzheim”Lat = 41.000Lon = 40.840
6TRANSFERS
Name= “Xing Lee”Country = “China”IBAN = “XXXXXX”
9
Name= “Blacklist”
amount: € 4500
MARKED
Thank you!