SlideShare a Scribd company logo
Graph DB 101
with Neo4j and friends

!

Paulo Traça
paulo.traca@cultofbits.com
The Problem
RDBMS are good at
Aggregation
Ordered data
Truly tabular data
Few or clearly defined relationships
Relational databases aren’t very
good with relationships.
Graph DB’s
A graph database uses graph structure with nodes,
edges, and properties to represent and store data.
!

By definition, a graph database is any storage system
that provides index-free adjacency. This means that
every element contains a direct pointer to its adjacent
element and no index lookups are necessary.
NODES
Nodes represent Entities such as people, businesses,
accounts, or any other item you might want to keep
track of.
Properties
Properties are pertinent information that relate to
nodes.
EDGES
Edges are the lines that connect nodes to nodes or nodes to properties and
they represent the relationship between the two. Most of the important
information is really stored in the edges. Meaningful patterns emerge
when one examines the connections and interconnections of nodes,
properties, and edges.
Graph databases focus on
the interconnection
between Entities
Compared with relational databases
Graph databases are often faster for associative data sets
!

map more directly to the structure of object-oriented applications
!

Scale more naturally to large data sets as they do not typically require expensive
join operations.
!

As they depend less on a rigid schema, they are more suitable to manage ad-hoc
and changing data with evolving schemas.
What to find
vs
How to find
// Find all the directors who have directed a movie scored by John Williams
// that starred Kevin Bacon
!
START actor=(actors, 'Kevin Bacon'), composer=(compsers, 'John Williams')
MATCH (actor)-[:IN]->(movie)<-[:DIRECTED]-(director),
      (movie)<-[:SCORED]-(composer)
RETURN director
Modelling a Domain with Graphs
Graphs are "whiteboard-friendly"
Nouns become nodes
Verbs become relationships
Properties are adjectives and adverbs
NEO4J
Key Features
Java Based
Property Graph Model
Uses Lucene for indexing of graph/relationship properties
ACID Transactions
Massive scalability
Extensible
High performance on deep transversal
Key Features
Property Graph Model
!

. Nodes
. Nodes have key / value properties
. Relationships between nodes
. Relationships have labels
. Relationships have key / value properties
. Relationships are directed but transversal at equals speed in both directions
. Semantics of the directions is up to the applications
Key Features
ACID Transactions
Custom JTA/JTS compliant transaction manager
distributed transactions
two-phase commit (2PC)
Transaction recovery
deadlock detection
!

Massive Scalability
Supporting billions of nodes/relationships props on a single machine
Key Features
.Can run embedded or Standalone via REST
. Plugins : Spatial data, Lucene, RDF, SOLR
. Runs on major platforms : Mac | Windows | Unix
. Extensive documentation
. Active community
. Open Source
Enterprise strength
database
Finding Stuff
TRANSVERSAL
CYPHER
Cypher is a declarative graph query language that allows
for expressive and efficient querying and updating of the
graph store without having to write traversals through the
graph structure in code
CYPHER
START: Starting points in the graph, obtained via index lookups or by element IDs.
MATCH: The graph pattern to match, bound to the starting points in START.
WHERE: Filtering criteria.
RETURN: What to return.
CREATE: Creates nodes and relationships.
DELETE: Removes nodes, relationships and properties.
SET: Set values to properties.
FOREACH: Performs updating actions once per element in a list.
WITH: Divides a query into multiple, distinct parts.
Graph Algorithms
Shortest paths,
all paths,
all simple paths,
Dijkstra and
A*.
REST API
DEMO TIME
That’s All Folks
Thank you!
!

!

@ptraca

More Related Content

What's hot (8)

PPTX
MS SQL Server Analysis Services 2008 and Enterprise Data Warehousing
Slava Kokaev
 
PPTX
Key-Key-Value Stores for Efficiently Processing Graph Data in the Cloud
University of New South Wales
 
PDF
Data visualization 2
ManokamnaKochar1
 
PPTX
Module 2
Gaurav Malode
 
PPT
E-Docs Asset GIS
Aerial Services
 
PPTX
Fast Focus: SQL Server Graph Database & Processing
Karen Lopez
 
PDF
Sap business objects BI4.0 reporting presentation
shaktell2
 
PPTX
Sigma EE: Reaping low-hanging fruits in RDF-based data integration
Richard Cyganiak
 
MS SQL Server Analysis Services 2008 and Enterprise Data Warehousing
Slava Kokaev
 
Key-Key-Value Stores for Efficiently Processing Graph Data in the Cloud
University of New South Wales
 
Data visualization 2
ManokamnaKochar1
 
Module 2
Gaurav Malode
 
E-Docs Asset GIS
Aerial Services
 
Fast Focus: SQL Server Graph Database & Processing
Karen Lopez
 
Sap business objects BI4.0 reporting presentation
shaktell2
 
Sigma EE: Reaping low-hanging fruits in RDF-based data integration
Richard Cyganiak
 

Similar to Graph Databases 101 (20)

PPTX
Unit-10.pptx
GhanashyamBK1
 
PPTX
NoSQL Graph Databases - Why, When and Where
Eugene Hanikblum
 
PDF
Whitepaper sones GraphDB (eng)
sones GmbH
 
PDF
All About Database v1.1
RastinKenarsari
 
PPTX
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
RushikeshChikane2
 
PPTX
WEB_DATABASE_chapter_4.pptx
Koteswari Kasireddy
 
PPT
Graph Database and Neo4j
Sina Khorami
 
PPTX
Presentation1
Celso Catacutan Jr.
 
PDF
PDF Replacer Pro 1.8.9.4 Free Download
alihamzakpa093
 
PDF
ExplorerPatcher 22621.4317.67.1 Free Download
mohsinraza05mb
 
PDF
Auslogics Video Grabber 1.0.0.12 Free Download
blouch119kp
 
PDF
NOSQL in big data is the not only structure langua.pdf
ajajkhan16
 
PDF
NOSQL- Presentation on NoSQL
Ramakant Soni
 
PDF
Government GraphSummit: Leveraging Knowledge Graphs for Foundational Intellig...
Neo4j
 
PPTX
Ramya ppt.pptx
RRamyaDevi
 
PPTX
Selecting the right database type for your knowledge management needs.
Synaptica, LLC
 
PPTX
Using Graph Databases For Insights Into Connected Data.
Xebia IT Architects
 
PPTX
Database awareness
kloia
 
PDF
Brief introduction to NoSQL by fas mosleh
Fas (Feisal) Mosleh
 
PDF
OUTCOME ANALYSIS IN ACADEMIC INSTITUTIONS USING NEO4J
ijcsity
 
Unit-10.pptx
GhanashyamBK1
 
NoSQL Graph Databases - Why, When and Where
Eugene Hanikblum
 
Whitepaper sones GraphDB (eng)
sones GmbH
 
All About Database v1.1
RastinKenarsari
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
RushikeshChikane2
 
WEB_DATABASE_chapter_4.pptx
Koteswari Kasireddy
 
Graph Database and Neo4j
Sina Khorami
 
Presentation1
Celso Catacutan Jr.
 
PDF Replacer Pro 1.8.9.4 Free Download
alihamzakpa093
 
ExplorerPatcher 22621.4317.67.1 Free Download
mohsinraza05mb
 
Auslogics Video Grabber 1.0.0.12 Free Download
blouch119kp
 
NOSQL in big data is the not only structure langua.pdf
ajajkhan16
 
NOSQL- Presentation on NoSQL
Ramakant Soni
 
Government GraphSummit: Leveraging Knowledge Graphs for Foundational Intellig...
Neo4j
 
Ramya ppt.pptx
RRamyaDevi
 
Selecting the right database type for your knowledge management needs.
Synaptica, LLC
 
Using Graph Databases For Insights Into Connected Data.
Xebia IT Architects
 
Database awareness
kloia
 
Brief introduction to NoSQL by fas mosleh
Fas (Feisal) Mosleh
 
OUTCOME ANALYSIS IN ACADEMIC INSTITUTIONS USING NEO4J
ijcsity
 
Ad

More from Paulo Traça (6)

PPTX
DevOps, Agile methods and Continuous Improvement in the Software development ...
Paulo Traça
 
PDF
INT08 Interoperabilidade de Web Service com WCF e Metro
Paulo Traça
 
PDF
Desenvolvimento Ágil e Scrum 101
Paulo Traça
 
PDF
Moving to Scrum
Paulo Traça
 
PPT
Real World S O A
Paulo Traça
 
PDF
Groovy Up Your Code
Paulo Traça
 
DevOps, Agile methods and Continuous Improvement in the Software development ...
Paulo Traça
 
INT08 Interoperabilidade de Web Service com WCF e Metro
Paulo Traça
 
Desenvolvimento Ágil e Scrum 101
Paulo Traça
 
Moving to Scrum
Paulo Traça
 
Real World S O A
Paulo Traça
 
Groovy Up Your Code
Paulo Traça
 
Ad

Recently uploaded (20)

PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Designing Production-Ready AI Agents
Kunal Rai
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Designing Production-Ready AI Agents
Kunal Rai
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 

Graph Databases 101

  • 1. Graph DB 101 with Neo4j and friends ! Paulo Traça [email protected]
  • 3. RDBMS are good at Aggregation Ordered data Truly tabular data Few or clearly defined relationships
  • 4. Relational databases aren’t very good with relationships.
  • 6. A graph database uses graph structure with nodes, edges, and properties to represent and store data. ! By definition, a graph database is any storage system that provides index-free adjacency. This means that every element contains a direct pointer to its adjacent element and no index lookups are necessary.
  • 7. NODES Nodes represent Entities such as people, businesses, accounts, or any other item you might want to keep track of.
  • 8. Properties Properties are pertinent information that relate to nodes.
  • 9. EDGES Edges are the lines that connect nodes to nodes or nodes to properties and they represent the relationship between the two. Most of the important information is really stored in the edges. Meaningful patterns emerge when one examines the connections and interconnections of nodes, properties, and edges.
  • 10. Graph databases focus on the interconnection between Entities
  • 11. Compared with relational databases Graph databases are often faster for associative data sets ! map more directly to the structure of object-oriented applications ! Scale more naturally to large data sets as they do not typically require expensive join operations. ! As they depend less on a rigid schema, they are more suitable to manage ad-hoc and changing data with evolving schemas.
  • 12. What to find vs How to find // Find all the directors who have directed a movie scored by John Williams // that starred Kevin Bacon ! START actor=(actors, 'Kevin Bacon'), composer=(compsers, 'John Williams') MATCH (actor)-[:IN]->(movie)<-[:DIRECTED]-(director),       (movie)<-[:SCORED]-(composer) RETURN director
  • 13. Modelling a Domain with Graphs Graphs are "whiteboard-friendly" Nouns become nodes Verbs become relationships Properties are adjectives and adverbs
  • 14. NEO4J
  • 15. Key Features Java Based Property Graph Model Uses Lucene for indexing of graph/relationship properties ACID Transactions Massive scalability Extensible High performance on deep transversal
  • 16. Key Features Property Graph Model ! . Nodes . Nodes have key / value properties . Relationships between nodes . Relationships have labels . Relationships have key / value properties . Relationships are directed but transversal at equals speed in both directions . Semantics of the directions is up to the applications
  • 17. Key Features ACID Transactions Custom JTA/JTS compliant transaction manager distributed transactions two-phase commit (2PC) Transaction recovery deadlock detection ! Massive Scalability Supporting billions of nodes/relationships props on a single machine
  • 18. Key Features .Can run embedded or Standalone via REST . Plugins : Spatial data, Lucene, RDF, SOLR . Runs on major platforms : Mac | Windows | Unix . Extensive documentation . Active community . Open Source
  • 22. CYPHER Cypher is a declarative graph query language that allows for expressive and efficient querying and updating of the graph store without having to write traversals through the graph structure in code
  • 23. CYPHER START: Starting points in the graph, obtained via index lookups or by element IDs. MATCH: The graph pattern to match, bound to the starting points in START. WHERE: Filtering criteria. RETURN: What to return. CREATE: Creates nodes and relationships. DELETE: Removes nodes, relationships and properties. SET: Set values to properties. FOREACH: Performs updating actions once per element in a list. WITH: Divides a query into multiple, distinct parts.
  • 24. Graph Algorithms Shortest paths, all paths, all simple paths, Dijkstra and A*.
  • 27. That’s All Folks Thank you! ! ! @ptraca