GGRAPHRAPH
DDATABASEATABASE
Shruti Arya
July 22, 2013
Graph Database
GRAPH DATABASE
A graph is a set of nodes
interconnected by links .
A database is an organised
collection of data.
A Graph Database is a database that
uses graph structures with nodes,
edges, and properties to represent
and store information.
The Graph DB Model
 Graph databases are NoSQL databases.
 NoSQL is a data storage technology.
 NoSQL simply means “ NOT ONLY SQL”.
NNeed of Grapheed of Graph
DatabaseDatabase //
NoSQLNoSQL
IINCREASING SIZE OF DATANCREASING SIZE OF DATA
SETSET
2007 2008
2009
2010
2011?
0
500
1000
1500
2000
2500
3000
• Text (content)
• Hyper-Text (added pointers)
• RSS (joined those pointers)
• Blogs (added pingbacks)
• Tagging (grouped related
data)
• RDF (described connected
data)
• GGG (content + pointers
+ relationships +
descriptions)
CCONNECTED-NESSONNECTED-NESS
GGG = Giant global graph
SSEMI-EMI-SSTRUCTUREDTRUCTURED IINFORMATIONNFORMATION
 If you tried to collect all the data of every movie ever
made, how would you model it?
 Actors, Characters, Locations, Dates, Costs, Ratings,
Showings, Ticket Sales, etc.
 Need to store more data about each entity
AARCHITECTURERCHITECTURE
Four NoSQL Quadrants / Categories
Key Value Stores: Pros and Cons
Pros:
Simple data model
Scalable
Cons:
Create your own “foreign keys”
Poor for complex data
Column Family: Pros and Cons
Pros:
Supports Simi-Structured Data
Naturally Indexed (columns)
Scalable
Cons:
Poor for interconnected data
Document Databases: Pros and Cons
Pros:
Simple, powerful data model
Scalable
Cons:
Poor for interconnected data
Query model limited to keys and indexes
Map reduce for larger queries
Graph Databases: Pros and Cons
Pros:
Powerful data model, as general as RDBMS
Connected data locally indexed
Easy to query
Cons:
Requires rewiring your brain
HHOWOW GGRAPHRAPH DDATABASESATABASES
WWORKORK ??
The Graph DB Model
“A Graph —records data in→ Nodes —which have→
Properties”
“Nodes —are organized by Relationships —which also have→ →
Properties”
Building a Node Space
Building a Node Space
Defining Relationship Types
The Graph DB Model : traversal
Traversing a Node Space
QQUERYUERY AA GGRAPHRAPH WWITHITH TTRAVERSALRAVERSAL
“A Traversal —navigates→ a Graph; it —identifies→ Paths
—which order→ Nodes”
Graph Database Vendors 
 Neo4J (neo4j.org)
 OrientDB (orientechnologies.com)
 Dex
 HyperGraphDB
 Infogrid
 Sones
Graph Database Use Cases 
 Clustering  Task Planning
 Social Connections  Scheduling
 Hubs  Process Assignation
 Graph Mining  Routing
 Centrality Measures  Logistics
 Location Based services  League Planning
Graph Like Applications
 Recommendations
– Heuristics (Page Rank)
– Local
 Shortest Paths
 Hammock Functions
 Walks
 Search algorithms
 Shooting stars
 K-nearest neighbours
Some of the best-known uses of graph databases include Google’s
Knowledge Graph, Facebook's Social Graph and Twitter’s Interest Graph.
 If your database is highly associative
 If your data is NOT used for statistical analysis, data
mining and exploration, or operational research
 If you have large data sets with changing or on-the-
fly schemas
When To Use Graph Databases?
 Represent related data as it inherently is. So, developers can start
coding immediately
 Great performance , as graph databases, which are defined as
any storage system that provides index-free adjacency. What this
means is that every element in the database contains a direct link
to its adjacent element, and so no need of joins
 Response time remains constant, not depending on the total
amount of data stored.
Benefits Of Graph Databases?
Thank you…. 

Graph database

  • 1.
  • 2.
    Graph Database GRAPH DATABASE Agraph is a set of nodes interconnected by links . A database is an organised collection of data.
  • 3.
    A Graph Databaseis a database that uses graph structures with nodes, edges, and properties to represent and store information.
  • 4.
  • 5.
     Graph databasesare NoSQL databases.  NoSQL is a data storage technology.  NoSQL simply means “ NOT ONLY SQL”.
  • 6.
    NNeed of Grapheedof Graph DatabaseDatabase // NoSQLNoSQL
  • 7.
    IINCREASING SIZE OFDATANCREASING SIZE OF DATA SETSET 2007 2008 2009 2010 2011? 0 500 1000 1500 2000 2500 3000
  • 8.
    • Text (content) •Hyper-Text (added pointers) • RSS (joined those pointers) • Blogs (added pingbacks) • Tagging (grouped related data) • RDF (described connected data) • GGG (content + pointers + relationships + descriptions) CCONNECTED-NESSONNECTED-NESS GGG = Giant global graph
  • 9.
    SSEMI-EMI-SSTRUCTUREDTRUCTURED IINFORMATIONNFORMATION  Ifyou tried to collect all the data of every movie ever made, how would you model it?  Actors, Characters, Locations, Dates, Costs, Ratings, Showings, Ticket Sales, etc.  Need to store more data about each entity
  • 10.
  • 12.
  • 15.
    Key Value Stores:Pros and Cons Pros: Simple data model Scalable Cons: Create your own “foreign keys” Poor for complex data
  • 16.
    Column Family: Prosand Cons Pros: Supports Simi-Structured Data Naturally Indexed (columns) Scalable Cons: Poor for interconnected data
  • 17.
    Document Databases: Prosand Cons Pros: Simple, powerful data model Scalable Cons: Poor for interconnected data Query model limited to keys and indexes Map reduce for larger queries
  • 18.
    Graph Databases: Prosand Cons Pros: Powerful data model, as general as RDBMS Connected data locally indexed Easy to query Cons: Requires rewiring your brain
  • 19.
  • 20.
  • 21.
    “A Graph —recordsdata in→ Nodes —which have→ Properties” “Nodes —are organized by Relationships —which also have→ → Properties”
  • 23.
  • 24.
  • 25.
  • 26.
    The Graph DBModel : traversal
  • 28.
  • 29.
    QQUERYUERY AA GGRAPHRAPHWWITHITH TTRAVERSALRAVERSAL “A Traversal —navigates→ a Graph; it —identifies→ Paths —which order→ Nodes”
  • 30.
    Graph Database Vendors  Neo4J (neo4j.org)  OrientDB (orientechnologies.com)  Dex  HyperGraphDB  Infogrid  Sones
  • 31.
    Graph Database UseCases   Clustering  Task Planning  Social Connections  Scheduling  Hubs  Process Assignation  Graph Mining  Routing  Centrality Measures  Logistics  Location Based services  League Planning
  • 32.
    Graph Like Applications Recommendations – Heuristics (Page Rank) – Local  Shortest Paths  Hammock Functions  Walks  Search algorithms  Shooting stars  K-nearest neighbours Some of the best-known uses of graph databases include Google’s Knowledge Graph, Facebook's Social Graph and Twitter’s Interest Graph.
  • 33.
     If yourdatabase is highly associative  If your data is NOT used for statistical analysis, data mining and exploration, or operational research  If you have large data sets with changing or on-the- fly schemas When To Use Graph Databases?
  • 34.
     Represent relateddata as it inherently is. So, developers can start coding immediately  Great performance , as graph databases, which are defined as any storage system that provides index-free adjacency. What this means is that every element in the database contains a direct link to its adjacent element, and so no need of joins  Response time remains constant, not depending on the total amount of data stored. Benefits Of Graph Databases?
  • 35.