SlideShare a Scribd company logo
1 of 26
Download to read offline
Application Modeling with Graph
Databases – Relationships are cool!
Lars Martin, JUG Saxony Day, 04.04.2014
Application Modeling with Graph Databases – Relationships are cool!
§  Developer, Architect,
Consultant
§  Java Enterprise, Eclipse,
Continuous …
§  Entrepreneur since 1998
Who’s the guy?
Agenda
² Status Quo
² SQL Join Hell
² Graph Basics
² Application Modeling
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling with Graph Databases – Relationships are cool!
Status Quo
http://db-engines.com/en/ranking_definition
Application Modeling with Graph Databases – Relationships are cool!
SQL Join Hell(1)
Customer
Id Name Address
1Robert 3
2Lars 7
3Michael 23
Address
Id Location
3Berlin
4Munich
7Dresden
23Leipzig
CustomerAddress
CId AId
1 3
2 7
2 8
3 23
Address
Id Location
3Berlin
7Dresden
8New York
23Leipzig
Address
Id Customer Location
3 1Berlin
7 2Dresden
8 2New York
23 3Leipzig
Customer
Id Name
1Robert
2Lars
3Michael
1:1 Relationship
m:n Relationship
1:n Relationship
Customer
Id Name
1Robert
2Lars
3Michael
Application Modeling with Graph Databases – Relationships are cool!
SQL Join Hell(2)
Application Modeling with Graph Databases – Relationships are cool!
SQL Join Hell(3)
­ all JOINs are executed every time you query (traverse)
the relationship
­ executing a JOIN means to search for a key in another
table
­ with Indices executing a JOIN means to lookup a key
­ B-Tree Index: O(log(n))
­ more entries è more lookups è slower JOINs
Application Modeling with Graph Databases – Relationships are cool!
Graphs – a Crash Course in Coolness
G = (V, E)Graph
Vertex
Edgeh"p://de.wikipedia.org/wiki/Graph_(Graphentheorie)	
  
Application Modeling with Graph Databases – Relationships are cool!
Graphs – a Crash Course in Coolness
Application Modeling with Graph Databases – Relationships are cool!
Graphs – a Crash Course in Coolness
Vertices
•  unique identifier
•  outgoing edges
•  incoming edges
•  key/value pairs
Edges
•  unique identifier
•  start vertex
•  end vertex
•  type
•  key/value pairs
https://github.com/tinkerpop/gremlin/wiki/Defining-a-Property-Graph
index-free adjacency (≈ O(1))
Application Modeling with Graph Databases – Relationships are cool!
Real World Graphs (1)
maps closely
to the data
model
noun = vertex
verb = edge
Application Modeling with Graph Databases – Relationships are cool!
Real World Graphs (2)
“whiteboard” friendly
Application Modeling with Graph Databases – Relationships are cool!
Ø  Social: Facebook, Twitter, LinkedIn
Ø  Recommendations: Amazon, MovieDB
Ø  Logistics: Package Routing
Ø  Financial: Fraud Detection
Ø  Software: Dependency Management
Ø  Authorization & Access Control:
Ø  …
Real World Graphs (3)
Application Modeling with Graph Databases – Relationships are cool!
Ø  Social: Facebook, Twitter, LinkedIn
Ø  Recommendations: Amazon, MovieDB
Ø  Logistics: Package Routing
Ø  Financial: Fraud Detection
Ø  Software: Dependency Management
Ø  Authorization & Access Control:
Ø  …
Real World Graphs (3)
our area of
activities
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling
Spring Data – projects.spring.io/spring-data
ü  Spring Data Neo4j supports property graph features
XO - eXtended Objects – github.com/buschmais/xo
ü  Lightweight Datastore-agnostic ORM
ü  Implementation of “Composite Pattern”
ü  Interface based (no POJOS), multiple inheritance
ü  XO-Neo4j supports property graph features
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling
@Label	
public interface User {	
	
@Indexed(unique = true)	
String getName();	
void setName(String name);	
	
@Relation("POSTED")	
@Outgoing	
Set<Tweet> getTweets();	
	
@Relation("FOLLOWS")	
@Outgoing	
Set<User> getFollowing();	
	
}	
@Label	
public interface Tweet {	
	
@Indexed(unique = true)	
long getTweetId();	
void setTweetId(long id);	
	
String getText();	
void setText(String text);	
	
@Relation("POSTED")	
@Incoming	
User getSender();	
void setSender(User sender);	
	
@Relation("MENTIONED")	
@Outgoing	
Set<User> getMentions();	
	…	
}
MATCH	
	(me)-[:POSTED]->(tweet)-[:MENTIONED]->(user)	
WHERE	
	me.name = 'Neo4j’ AND NOT (me)-[:FOLLOWS]->(user)	
WITH	
	user ORDER BY user.name	
RETURN	
	DISTINCT user	
  
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling
@ResultOf	
@Cypher("MATCH (me)-[:POSTED]->(tweet)-
[:MENTIONED]->(user) WHERE id(me) = id({this})
AND NOT (me)-[:FOLLOWS]->(user) WITH user
ORDER BY user.name RETURN DISTINCT user")	
Result<User> suggestFriends();	
  
Demo
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling
Relational Database
•  tabular data structures
Graph Database
•  connected data, esp.
multiple degrees
•  schema-less
Application Modeling with Graph Databases – Relationships are cool!
Application Modeling
“A relational database
may tell you the average
age of everyone in this
place …
… but a graph database
will tell you who is most
likely to buy you a beer.”
SMB GmbH – Plauenscher Ring 21 – D-01187 Dresden
Dipl.-Inf. Lars Martin
+49-(0)173-64 24 461
lars.martin@smb-tec.com
Application Modeling with Graph Databases - Relationships are cool

More Related Content

What's hot

Creating a Data Distribution Knowledge Base using Neo4j, UBS
Creating a Data Distribution Knowledge Base using Neo4j, UBSCreating a Data Distribution Knowledge Base using Neo4j, UBS
Creating a Data Distribution Knowledge Base using Neo4j, UBSNeo4j
 
Challenges in the Design of a Graph Database Benchmark
Challenges in the Design of a Graph Database Benchmark Challenges in the Design of a Graph Database Benchmark
Challenges in the Design of a Graph Database Benchmark graphdevroom
 
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...Neo4j
 
Graph All the Things: An Introduction to Graph Databases
Graph All the Things: An Introduction to Graph DatabasesGraph All the Things: An Introduction to Graph Databases
Graph All the Things: An Introduction to Graph DatabasesNeo4j
 
The Total Economic ImpactTM (TEI) of Neo4j, Featuring Forrester
The Total Economic ImpactTM (TEI) of Neo4j, Featuring ForresterThe Total Economic ImpactTM (TEI) of Neo4j, Featuring Forrester
The Total Economic ImpactTM (TEI) of Neo4j, Featuring ForresterNeo4j
 
Graph Networks for Object Recognition
Graph Networks for Object RecognitionGraph Networks for Object Recognition
Graph Networks for Object RecognitionVaticle
 
GraphConnect SF 2013 Keynote
GraphConnect SF 2013 KeynoteGraphConnect SF 2013 Keynote
GraphConnect SF 2013 KeynoteEmil Eifrem
 
The years of the graph: The future of the future is here
The years of the graph: The future of the future is hereThe years of the graph: The future of the future is here
The years of the graph: The future of the future is hereConnected Data World
 
Towards Automating Data Narratives
Towards Automating Data NarrativesTowards Automating Data Narratives
Towards Automating Data Narrativesdgarijo
 
Multiplatform solution for graph datasources
Multiplatform solution for graph datasourcesMultiplatform solution for graph datasources
Multiplatform solution for graph datasourcesJavier Domínguez Montes
 
Unveiling the knowledge in knowledge graphs
Unveiling the knowledge in knowledge graphsUnveiling the knowledge in knowledge graphs
Unveiling the knowledge in knowledge graphsNeo4j
 
DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...
DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...
DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...Dataconomy Media
 
Extracting, Aligning, and Linking Data to Build Knowledge Graphs
Extracting, Aligning, and Linking Data to Build Knowledge GraphsExtracting, Aligning, and Linking Data to Build Knowledge Graphs
Extracting, Aligning, and Linking Data to Build Knowledge GraphsCraig Knoblock
 
Hardcore Data Science - in Practice
Hardcore Data Science - in PracticeHardcore Data Science - in Practice
Hardcore Data Science - in PracticeMikio L. Braun
 
RAPIDS cuGraph – Accelerating all your Graph needs
RAPIDS cuGraph – Accelerating all your Graph needsRAPIDS cuGraph – Accelerating all your Graph needs
RAPIDS cuGraph – Accelerating all your Graph needsConnected Data World
 
Fireside Chat with Bloor Research: State of the Graph Database Market 2020
Fireside Chat with Bloor Research: State of the Graph Database Market 2020Fireside Chat with Bloor Research: State of the Graph Database Market 2020
Fireside Chat with Bloor Research: State of the Graph Database Market 2020Cambridge Semantics
 

What's hot (20)

Creating a Data Distribution Knowledge Base using Neo4j, UBS
Creating a Data Distribution Knowledge Base using Neo4j, UBSCreating a Data Distribution Knowledge Base using Neo4j, UBS
Creating a Data Distribution Knowledge Base using Neo4j, UBS
 
Challenges in the Design of a Graph Database Benchmark
Challenges in the Design of a Graph Database Benchmark Challenges in the Design of a Graph Database Benchmark
Challenges in the Design of a Graph Database Benchmark
 
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
 
Graph All the Things: An Introduction to Graph Databases
Graph All the Things: An Introduction to Graph DatabasesGraph All the Things: An Introduction to Graph Databases
Graph All the Things: An Introduction to Graph Databases
 
The Total Economic ImpactTM (TEI) of Neo4j, Featuring Forrester
The Total Economic ImpactTM (TEI) of Neo4j, Featuring ForresterThe Total Economic ImpactTM (TEI) of Neo4j, Featuring Forrester
The Total Economic ImpactTM (TEI) of Neo4j, Featuring Forrester
 
Graph Networks for Object Recognition
Graph Networks for Object RecognitionGraph Networks for Object Recognition
Graph Networks for Object Recognition
 
GraphConnect SF 2013 Keynote
GraphConnect SF 2013 KeynoteGraphConnect SF 2013 Keynote
GraphConnect SF 2013 Keynote
 
Graph Realities
Graph RealitiesGraph Realities
Graph Realities
 
The years of the graph: The future of the future is here
The years of the graph: The future of the future is hereThe years of the graph: The future of the future is here
The years of the graph: The future of the future is here
 
Towards Automating Data Narratives
Towards Automating Data NarrativesTowards Automating Data Narratives
Towards Automating Data Narratives
 
Multiplatform solution for graph datasources
Multiplatform solution for graph datasourcesMultiplatform solution for graph datasources
Multiplatform solution for graph datasources
 
(Big) Data Science
(Big) Data Science(Big) Data Science
(Big) Data Science
 
Graph based data models
Graph based data modelsGraph based data models
Graph based data models
 
Unveiling the knowledge in knowledge graphs
Unveiling the knowledge in knowledge graphsUnveiling the knowledge in knowledge graphs
Unveiling the knowledge in knowledge graphs
 
DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...
DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...
DN18 | From Counting to Connecting: A Networked and Data-Driven Approach to M...
 
Extracting, Aligning, and Linking Data to Build Knowledge Graphs
Extracting, Aligning, and Linking Data to Build Knowledge GraphsExtracting, Aligning, and Linking Data to Build Knowledge Graphs
Extracting, Aligning, and Linking Data to Build Knowledge Graphs
 
Graph db
Graph dbGraph db
Graph db
 
Hardcore Data Science - in Practice
Hardcore Data Science - in PracticeHardcore Data Science - in Practice
Hardcore Data Science - in Practice
 
RAPIDS cuGraph – Accelerating all your Graph needs
RAPIDS cuGraph – Accelerating all your Graph needsRAPIDS cuGraph – Accelerating all your Graph needs
RAPIDS cuGraph – Accelerating all your Graph needs
 
Fireside Chat with Bloor Research: State of the Graph Database Market 2020
Fireside Chat with Bloor Research: State of the Graph Database Market 2020Fireside Chat with Bloor Research: State of the Graph Database Market 2020
Fireside Chat with Bloor Research: State of the Graph Database Market 2020
 

Viewers also liked

Exploring cypher with graph gists
Exploring cypher with graph gistsExploring cypher with graph gists
Exploring cypher with graph gistsLuanne Misquitta
 
Graph Databases, a little connected tour (Codemotion Rome)
Graph Databases, a little connected tour (Codemotion Rome)Graph Databases, a little connected tour (Codemotion Rome)
Graph Databases, a little connected tour (Codemotion Rome)fcofdezc
 
Intro to Graphs and Neo4j
Intro to Graphs and Neo4jIntro to Graphs and Neo4j
Intro to Graphs and Neo4jjexp
 
The Five Graphs of Government: How Federal Agencies can Utilize Graph Technology
The Five Graphs of Government: How Federal Agencies can Utilize Graph TechnologyThe Five Graphs of Government: How Federal Agencies can Utilize Graph Technology
The Five Graphs of Government: How Federal Agencies can Utilize Graph TechnologyNeo4j
 
GraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right TechnologyGraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right TechnologyNeo4j
 
Intro to Neo4j presentation
Intro to Neo4j presentationIntro to Neo4j presentation
Intro to Neo4j presentationjexp
 
GraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jGraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jNeo4j
 
GraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access ManagementGraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access ManagementNeo4j
 
GraphTalks Rome - The Italian Business Graph
GraphTalks Rome - The Italian Business GraphGraphTalks Rome - The Italian Business Graph
GraphTalks Rome - The Italian Business GraphNeo4j
 
Knowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your KnowledgeKnowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your KnowledgeNeo4j
 
Webinar: RDBMS to Graphs
Webinar: RDBMS to GraphsWebinar: RDBMS to Graphs
Webinar: RDBMS to GraphsNeo4j
 
IT in Healthcare
IT in HealthcareIT in Healthcare
IT in HealthcareNetApp
 
Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Emiland
 
What I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessWhat I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessJonathon Colman
 
Visualization of Publication Impact
Visualization of Publication ImpactVisualization of Publication Impact
Visualization of Publication ImpactEamonn Maguire
 
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial FraudGraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial FraudNeo4j
 
GraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in ActionGraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in ActionNeo4j
 
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...Neo4j
 
GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone Neo4j
 

Viewers also liked (20)

Shutl
ShutlShutl
Shutl
 
Exploring cypher with graph gists
Exploring cypher with graph gistsExploring cypher with graph gists
Exploring cypher with graph gists
 
Graph Databases, a little connected tour (Codemotion Rome)
Graph Databases, a little connected tour (Codemotion Rome)Graph Databases, a little connected tour (Codemotion Rome)
Graph Databases, a little connected tour (Codemotion Rome)
 
Intro to Graphs and Neo4j
Intro to Graphs and Neo4jIntro to Graphs and Neo4j
Intro to Graphs and Neo4j
 
The Five Graphs of Government: How Federal Agencies can Utilize Graph Technology
The Five Graphs of Government: How Federal Agencies can Utilize Graph TechnologyThe Five Graphs of Government: How Federal Agencies can Utilize Graph Technology
The Five Graphs of Government: How Federal Agencies can Utilize Graph Technology
 
GraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right TechnologyGraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right Technology
 
Intro to Neo4j presentation
Intro to Neo4j presentationIntro to Neo4j presentation
Intro to Neo4j presentation
 
GraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jGraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4j
 
GraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access ManagementGraphTalks Rome - Identity and Access Management
GraphTalks Rome - Identity and Access Management
 
GraphTalks Rome - The Italian Business Graph
GraphTalks Rome - The Italian Business GraphGraphTalks Rome - The Italian Business Graph
GraphTalks Rome - The Italian Business Graph
 
Knowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your KnowledgeKnowledge Architecture: Graphing Your Knowledge
Knowledge Architecture: Graphing Your Knowledge
 
Webinar: RDBMS to Graphs
Webinar: RDBMS to GraphsWebinar: RDBMS to Graphs
Webinar: RDBMS to Graphs
 
IT in Healthcare
IT in HealthcareIT in Healthcare
IT in Healthcare
 
Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.
 
What I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessWhat I Carry: 10 Tools for Success
What I Carry: 10 Tools for Success
 
Visualization of Publication Impact
Visualization of Publication ImpactVisualization of Publication Impact
Visualization of Publication Impact
 
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial FraudGraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
GraphDay Stockholm - Levaraging Graph-Technology to fight Financial Fraud
 
GraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in ActionGraphDay Stockholm - Graphs in Action
GraphDay Stockholm - Graphs in Action
 
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
GraphDay Stockholm - iKnow Solutions - The Value Add of Graphs to Analytics a...
 
GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone GraphDay Stockholm - Telia Zone
GraphDay Stockholm - Telia Zone
 

Similar to Application Modeling with Graph Databases - Relationships are cool

How Graph Databases used in Police Department?
How Graph Databases used in Police Department?How Graph Databases used in Police Department?
How Graph Databases used in Police Department?Samet KILICTAS
 
La bi, l'informatique décisionnelle et les graphes
La bi, l'informatique décisionnelle et les graphesLa bi, l'informatique décisionnelle et les graphes
La bi, l'informatique décisionnelle et les graphesCédric Fauvet
 
Using A Distributed Graph Database To Make Sense Of Disparate Data Stores
Using A Distributed Graph Database To Make Sense Of Disparate Data StoresUsing A Distributed Graph Database To Make Sense Of Disparate Data Stores
Using A Distributed Graph Database To Make Sense Of Disparate Data StoresInfiniteGraph
 
Connecting the Dots—How a Graph Database Enables Discovery
Connecting the Dots—How a Graph Database Enables DiscoveryConnecting the Dots—How a Graph Database Enables Discovery
Connecting the Dots—How a Graph Database Enables DiscoveryInside Analysis
 
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4jAI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4jIvan Zoratti
 
The five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar finalThe five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar finalNeo4j
 
The five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar finalThe five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar finalNeo4j
 
Sample CS Senior Capstone Projects
Sample CS Senior Capstone ProjectsSample CS Senior Capstone Projects
Sample CS Senior Capstone ProjectsFred Annexstein
 
Semantic Security : Authorization on the Web with Ontologies
Semantic Security : Authorization on the Web with OntologiesSemantic Security : Authorization on the Web with Ontologies
Semantic Security : Authorization on the Web with OntologiesAmit Jain
 
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...Neo4j
 
Pre-Aggregated Analytics And Social Feeds Using MongoDB
Pre-Aggregated Analytics And Social Feeds Using MongoDBPre-Aggregated Analytics And Social Feeds Using MongoDB
Pre-Aggregated Analytics And Social Feeds Using MongoDBRackspace
 
Geschäftliches Potential für System-Integratoren und Berater - Graphdatenban...
Geschäftliches Potential für System-Integratoren und Berater -  Graphdatenban...Geschäftliches Potential für System-Integratoren und Berater -  Graphdatenban...
Geschäftliches Potential für System-Integratoren und Berater - Graphdatenban...Neo4j
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge GraphTrey Grainger
 
TadHenryResume2016
TadHenryResume2016TadHenryResume2016
TadHenryResume2016Tad Henry
 
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j
 
K anonymity for crowdsourcing database
K anonymity for crowdsourcing databaseK anonymity for crowdsourcing database
K anonymity for crowdsourcing databaseLeMeniz Infotech
 
How to Build a Semantic Search System
How to Build a Semantic Search SystemHow to Build a Semantic Search System
How to Build a Semantic Search SystemTrey Grainger
 
Turning Big Data into Smart Data with Graph Technologies
Turning Big Data into Smart Data with Graph TechnologiesTurning Big Data into Smart Data with Graph Technologies
Turning Big Data into Smart Data with Graph TechnologiesInfiniteGraph
 

Similar to Application Modeling with Graph Databases - Relationships are cool (20)

How Graph Databases used in Police Department?
How Graph Databases used in Police Department?How Graph Databases used in Police Department?
How Graph Databases used in Police Department?
 
La bi, l'informatique décisionnelle et les graphes
La bi, l'informatique décisionnelle et les graphesLa bi, l'informatique décisionnelle et les graphes
La bi, l'informatique décisionnelle et les graphes
 
Using A Distributed Graph Database To Make Sense Of Disparate Data Stores
Using A Distributed Graph Database To Make Sense Of Disparate Data StoresUsing A Distributed Graph Database To Make Sense Of Disparate Data Stores
Using A Distributed Graph Database To Make Sense Of Disparate Data Stores
 
Connecting the Dots—How a Graph Database Enables Discovery
Connecting the Dots—How a Graph Database Enables DiscoveryConnecting the Dots—How a Graph Database Enables Discovery
Connecting the Dots—How a Graph Database Enables Discovery
 
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4jAI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
AI, ML and Graph Algorithms: Real Life Use Cases with Neo4j
 
The five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar finalThe five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar final
 
The five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar finalThe five graphs of telecommunications may 22 2013 webinar final
The five graphs of telecommunications may 22 2013 webinar final
 
Sample CS Senior Capstone Projects
Sample CS Senior Capstone ProjectsSample CS Senior Capstone Projects
Sample CS Senior Capstone Projects
 
Semantic Security : Authorization on the Web with Ontologies
Semantic Security : Authorization on the Web with OntologiesSemantic Security : Authorization on the Web with Ontologies
Semantic Security : Authorization on the Web with Ontologies
 
Resume_Vignesh_ThulasiDass
Resume_Vignesh_ThulasiDass Resume_Vignesh_ThulasiDass
Resume_Vignesh_ThulasiDass
 
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
Using Connected Data and Graph Technology to Enhance Machine Learning and Art...
 
PykQuery.js
PykQuery.jsPykQuery.js
PykQuery.js
 
Pre-Aggregated Analytics And Social Feeds Using MongoDB
Pre-Aggregated Analytics And Social Feeds Using MongoDBPre-Aggregated Analytics And Social Feeds Using MongoDB
Pre-Aggregated Analytics And Social Feeds Using MongoDB
 
Geschäftliches Potential für System-Integratoren und Berater - Graphdatenban...
Geschäftliches Potential für System-Integratoren und Berater -  Graphdatenban...Geschäftliches Potential für System-Integratoren und Berater -  Graphdatenban...
Geschäftliches Potential für System-Integratoren und Berater - Graphdatenban...
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge Graph
 
TadHenryResume2016
TadHenryResume2016TadHenryResume2016
TadHenryResume2016
 
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
Neo4j : la voie du succès avec les bases de données de graphes et la Graph Da...
 
K anonymity for crowdsourcing database
K anonymity for crowdsourcing databaseK anonymity for crowdsourcing database
K anonymity for crowdsourcing database
 
How to Build a Semantic Search System
How to Build a Semantic Search SystemHow to Build a Semantic Search System
How to Build a Semantic Search System
 
Turning Big Data into Smart Data with Graph Technologies
Turning Big Data into Smart Data with Graph TechnologiesTurning Big Data into Smart Data with Graph Technologies
Turning Big Data into Smart Data with Graph Technologies
 

More from Lars Martin

Skalierbares CI Deployment mit Docker
Skalierbares CI Deployment mit DockerSkalierbares CI Deployment mit Docker
Skalierbares CI Deployment mit DockerLars Martin
 
Software Development in the Cloud
Software Development in the CloudSoftware Development in the Cloud
Software Development in the CloudLars Martin
 
Towards Clean Legacy Code
Towards Clean Legacy CodeTowards Clean Legacy Code
Towards Clean Legacy CodeLars Martin
 
smart3 - Smart Gardening für smarte Bürger in einer smarten City
smart3 - Smart Gardening für smarte Bürger in einer smarten Citysmart3 - Smart Gardening für smarte Bürger in einer smarten City
smart3 - Smart Gardening für smarte Bürger in einer smarten CityLars Martin
 
Software Archaeology - Raiders of the Lost Code (long)
Software Archaeology - Raiders of the Lost Code (long)Software Archaeology - Raiders of the Lost Code (long)
Software Archaeology - Raiders of the Lost Code (long)Lars Martin
 
Software Archaeology - Raiders of the Lost Code (short)
Software Archaeology - Raiders of the Lost Code (short)Software Archaeology - Raiders of the Lost Code (short)
Software Archaeology - Raiders of the Lost Code (short)Lars Martin
 
Formal Requirement Engineering with Xtext and ProR
Formal Requirement Engineering with Xtext and ProRFormal Requirement Engineering with Xtext and ProR
Formal Requirement Engineering with Xtext and ProRLars Martin
 

More from Lars Martin (7)

Skalierbares CI Deployment mit Docker
Skalierbares CI Deployment mit DockerSkalierbares CI Deployment mit Docker
Skalierbares CI Deployment mit Docker
 
Software Development in the Cloud
Software Development in the CloudSoftware Development in the Cloud
Software Development in the Cloud
 
Towards Clean Legacy Code
Towards Clean Legacy CodeTowards Clean Legacy Code
Towards Clean Legacy Code
 
smart3 - Smart Gardening für smarte Bürger in einer smarten City
smart3 - Smart Gardening für smarte Bürger in einer smarten Citysmart3 - Smart Gardening für smarte Bürger in einer smarten City
smart3 - Smart Gardening für smarte Bürger in einer smarten City
 
Software Archaeology - Raiders of the Lost Code (long)
Software Archaeology - Raiders of the Lost Code (long)Software Archaeology - Raiders of the Lost Code (long)
Software Archaeology - Raiders of the Lost Code (long)
 
Software Archaeology - Raiders of the Lost Code (short)
Software Archaeology - Raiders of the Lost Code (short)Software Archaeology - Raiders of the Lost Code (short)
Software Archaeology - Raiders of the Lost Code (short)
 
Formal Requirement Engineering with Xtext and ProR
Formal Requirement Engineering with Xtext and ProRFormal Requirement Engineering with Xtext and ProR
Formal Requirement Engineering with Xtext and ProR
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 

Application Modeling with Graph Databases - Relationships are cool

  • 1. Application Modeling with Graph Databases – Relationships are cool! Lars Martin, JUG Saxony Day, 04.04.2014
  • 2. Application Modeling with Graph Databases – Relationships are cool! §  Developer, Architect, Consultant §  Java Enterprise, Eclipse, Continuous … §  Entrepreneur since 1998 Who’s the guy?
  • 3. Agenda ² Status Quo ² SQL Join Hell ² Graph Basics ² Application Modeling Application Modeling with Graph Databases – Relationships are cool!
  • 4. Application Modeling with Graph Databases – Relationships are cool! Status Quo http://db-engines.com/en/ranking_definition
  • 5. Application Modeling with Graph Databases – Relationships are cool! SQL Join Hell(1) Customer Id Name Address 1Robert 3 2Lars 7 3Michael 23 Address Id Location 3Berlin 4Munich 7Dresden 23Leipzig CustomerAddress CId AId 1 3 2 7 2 8 3 23 Address Id Location 3Berlin 7Dresden 8New York 23Leipzig Address Id Customer Location 3 1Berlin 7 2Dresden 8 2New York 23 3Leipzig Customer Id Name 1Robert 2Lars 3Michael 1:1 Relationship m:n Relationship 1:n Relationship Customer Id Name 1Robert 2Lars 3Michael
  • 6. Application Modeling with Graph Databases – Relationships are cool! SQL Join Hell(2)
  • 7. Application Modeling with Graph Databases – Relationships are cool! SQL Join Hell(3) ­ all JOINs are executed every time you query (traverse) the relationship ­ executing a JOIN means to search for a key in another table ­ with Indices executing a JOIN means to lookup a key ­ B-Tree Index: O(log(n)) ­ more entries è more lookups è slower JOINs
  • 8.
  • 9. Application Modeling with Graph Databases – Relationships are cool! Graphs – a Crash Course in Coolness G = (V, E)Graph Vertex Edgeh"p://de.wikipedia.org/wiki/Graph_(Graphentheorie)  
  • 10. Application Modeling with Graph Databases – Relationships are cool! Graphs – a Crash Course in Coolness
  • 11. Application Modeling with Graph Databases – Relationships are cool! Graphs – a Crash Course in Coolness Vertices •  unique identifier •  outgoing edges •  incoming edges •  key/value pairs Edges •  unique identifier •  start vertex •  end vertex •  type •  key/value pairs https://github.com/tinkerpop/gremlin/wiki/Defining-a-Property-Graph index-free adjacency (≈ O(1))
  • 12.
  • 13. Application Modeling with Graph Databases – Relationships are cool! Real World Graphs (1) maps closely to the data model noun = vertex verb = edge
  • 14. Application Modeling with Graph Databases – Relationships are cool! Real World Graphs (2) “whiteboard” friendly
  • 15. Application Modeling with Graph Databases – Relationships are cool! Ø  Social: Facebook, Twitter, LinkedIn Ø  Recommendations: Amazon, MovieDB Ø  Logistics: Package Routing Ø  Financial: Fraud Detection Ø  Software: Dependency Management Ø  Authorization & Access Control: Ø  … Real World Graphs (3)
  • 16. Application Modeling with Graph Databases – Relationships are cool! Ø  Social: Facebook, Twitter, LinkedIn Ø  Recommendations: Amazon, MovieDB Ø  Logistics: Package Routing Ø  Financial: Fraud Detection Ø  Software: Dependency Management Ø  Authorization & Access Control: Ø  … Real World Graphs (3) our area of activities
  • 17.
  • 18. Application Modeling with Graph Databases – Relationships are cool! Application Modeling Spring Data – projects.spring.io/spring-data ü  Spring Data Neo4j supports property graph features XO - eXtended Objects – github.com/buschmais/xo ü  Lightweight Datastore-agnostic ORM ü  Implementation of “Composite Pattern” ü  Interface based (no POJOS), multiple inheritance ü  XO-Neo4j supports property graph features
  • 19. Application Modeling with Graph Databases – Relationships are cool! Application Modeling
  • 20. Application Modeling with Graph Databases – Relationships are cool! Application Modeling @Label public interface User { @Indexed(unique = true) String getName(); void setName(String name); @Relation("POSTED") @Outgoing Set<Tweet> getTweets(); @Relation("FOLLOWS") @Outgoing Set<User> getFollowing(); } @Label public interface Tweet { @Indexed(unique = true) long getTweetId(); void setTweetId(long id); String getText(); void setText(String text); @Relation("POSTED") @Incoming User getSender(); void setSender(User sender); @Relation("MENTIONED") @Outgoing Set<User> getMentions(); … }
  • 21. MATCH (me)-[:POSTED]->(tweet)-[:MENTIONED]->(user) WHERE me.name = 'Neo4j’ AND NOT (me)-[:FOLLOWS]->(user) WITH user ORDER BY user.name RETURN DISTINCT user   Application Modeling with Graph Databases – Relationships are cool! Application Modeling @ResultOf @Cypher("MATCH (me)-[:POSTED]->(tweet)- [:MENTIONED]->(user) WHERE id(me) = id({this}) AND NOT (me)-[:FOLLOWS]->(user) WITH user ORDER BY user.name RETURN DISTINCT user") Result<User> suggestFriends();  
  • 22. Demo Application Modeling with Graph Databases – Relationships are cool! Application Modeling
  • 23. Relational Database •  tabular data structures Graph Database •  connected data, esp. multiple degrees •  schema-less Application Modeling with Graph Databases – Relationships are cool! Application Modeling “A relational database may tell you the average age of everyone in this place … … but a graph database will tell you who is most likely to buy you a beer.”
  • 24.
  • 25. SMB GmbH – Plauenscher Ring 21 – D-01187 Dresden Dipl.-Inf. Lars Martin +49-(0)173-64 24 461 lars.martin@smb-tec.com