graph databases

26
1 Graph Databases Vinoth Kannan Introduction & Concepts [email protected]

Upload: vinoth-kumar-kannan

Post on 27-Jan-2015

113 views

Category:

Technology


3 download

DESCRIPTION

My presentation about introduction to graph database.

TRANSCRIPT

Page 1: Graph databases

1

Graph Databases

Vinoth Kannan

Introduction & Concepts

[email protected]

Page 2: Graph databases

2

Overview of NoSQL

What is a Graph Database

Concept

Some Use Cases

Conclusion

Agenda

Page 3: Graph databases

3

Overview of NoSQL

NoSQLNot Only SQL

Page 4: Graph databases

4

Types of NoSQL

Key Value Stores Column Family Document Databases Graph Databases

Page 5: 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

Page 6: Graph databases

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

Page 7: Graph databases

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

Page 8: Graph databases

8

Graph DatabasesNoSQL Types

Based on Euler & Graph TheoryData Model:

Nodes and Relationships

Examples:Neo4j, OrientDB, InfiniteGraph, AllegroGraph, Titan

Page 9: Graph databases

9

NoSQL PerformaceComplexity vs Size

Data Size

Dat

a C

ompl

exity

RDBMS

K-V Store

CF Store

Document Store

GraphStore

………………..

Page 10: Graph databases

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

Page 11: Graph databases

Different Types of Graphs

Graph Type Diagram

Undirected Graph

Directed Graph

Pseudo Graph

Multi Graph

Hyper Graph

Page 12: Graph databases

Different Types of Graphs

Graph Type Diagram

Weighted Graph

Labeled Graph

Property Graph

Page 13: Graph databases

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

Page 14: Graph databases

Compared to Relational Databases

Optimized for aggregation Optimized for connections

Page 15: Graph databases

Compared to Key Value Stores

Optimized for simple look-ups Optimized for traversing connected data

Page 16: Graph databases

Compared to Key Value Stores

Optimized for “trees” of data Optimized for seeing the forest and the trees, and the branches, and the trunks

Page 17: Graph databases

17

Friends RecommendationWondered How ?

Page 18: Graph databases

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

Page 19: Graph databases

19

Graph Search Feature of FBWondered How ?

Page 20: Graph databases

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”

Page 21: Graph databases

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

Page 22: Graph databases

22

Power of Graph Database

Social Data

Spatial Data

+

Page 23: Graph databases

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

Page 24: Graph databases

Some Use Cases

Highly connected data (social networks)Recommendations (e-commerce)Path Finding (how do I know you?)Anamoly Detection (Financial Services)

Page 25: Graph databases

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

Page 26: Graph databases

Thank you!