SlideShare a Scribd company logo
1 of 24
Download to read offline
GraphAware®
It Depends…
Luanne Misquitta

VP of Engineering
graphaware.com
@graph_aware, @luannem
and why it’s the most frequent answer to
graph modelling questions
The Data
GraphAware®
‣ Movies
‣ Actors
‣ Directors
‣ Roles
‣ Genres
Normalised
GraphAware®
Candidate Graph Model 1
GraphAware®
Person
name
ACTED_IN
DIRECTED
roles:[“role1”,”role2”] Movie

title

genre
Candidate Graph Model 2
GraphAware®
Person

name
Movie

title

ACTED_IN
DIRECTED
roles:[“role1”,”role2”]
Genre

name

HAS_GENRE
Candidate Graph Model 3
GraphAware®
Person

name
Movie

[Genre]

title

ACTED_IN
DIRECTED
roles:[“role1”,”role2”]
Candidate Graph Model 4
GraphAware®
Person

name
Movie

title

Genre

name

Role

name

HAS_GENRE
PLAYED_ROLE
ROLE
ROLE_IN_MOVIE
DIRECTED
GraphAware®
Don’t be afraid!
GraphAware®
‣ Graph modelling is an extremely useful exercise
‣ Validate your understanding of the problem on a whiteboard
‣ The way you naturally represent your domain on the whiteboard is generally
your graph model
‣ No normalisation rules required- all stakeholders can participate
‣ Expose gaps in thinking, missing data early
‣ This modelling is beneficial even if you’re not using a graph database
‣ But if you draw it as a graph, and think of it as a graph, you probably need a
graph database
A candidate model
GraphAware®
Person
name
ACTED_IN
DIRECTED
Movie

title
Now what?
GraphAware®
‣ Should role be
‣ a property on a relationship?
‣ a node?
Now what?
GraphAware®
‣ Should genre be
‣ a property on a node?
‣ a node?
‣ a label?
‣ both?
Now what?
GraphAware®
‣ Should…?
It depends!
GraphAware®
What is the question?
GraphAware®
‣ The use case or the question you’re asking of the graph will determine
the most suitable graph model to
‣ Answer the question
‣ Perform efficient queries
‣ Keep things simple- model just enough, but no more
‣ As a movie fan, I want to find a movie, and see actors and their roles
Use case #1
GraphAware®
‣ As a movie fan, I want to find a movie, and see actors and their roles
Use case #1
GraphAware®
Person

name
Movie

title

genre
ACTED_IN
DIRECTED
roles:[“role1”,”role2”]
‣ As a movie fan, I want to find movies in genres similar to my favourites
Use case #2
GraphAware®
‣ As a movie fan, I want to find movies in genres similar to my favourites
Use case #2
GraphAware®
Person

name
Movie

title

ACTED_IN
DIRECTED
roles:[“role1”,”role2”]
Genre

name

HAS_GENRE
Movie

title

Genre

name

ACTED_IN
HAS_GENRE
SIMILAR_TO
‣ As a movie fan, I want to find actors who played the role of Neo and the
awards they won for this role
Use case #3
GraphAware®
‣ As a movie fan, I want to find actors who played the role of Neo and the
awards they won for this role
Use case #3
GraphAware®
Person

name
Movie

title

DIRECTED
Genre

name

HAS_GENRE
Movie

title

Genre

name

ACTED_IN
HAS_GENRE
SIMILAR_TO
Role

name

<hyperedge>
Award

name

PLAYED_ROLE
AWARD_ROLE
ROLE
ROLE_IN_MOVIEYear
Summary
GraphAware®
‣ Know thy use case
‣ Keep it simple and intuitive
‣ Consider
‣ the shape and size of your data
‣ the density of relationships
‣ selectivity
‣ read vs write trade-offs
‣ Measure performance but…
‣ Do not prematurely optimise- graph model refactoring is easy!
Hunger Games
GraphAware®
1. Easy: To be able to model your graph well, you should know
A. Your use case
B. The weather
C. A list of hair-metal bands
2. Medium: Should I model this fact as a property of a node, or a node?
A. Property of a node
B. A node
C. It depends
3. Hard: Sometimes you need an edge that relates more than 2 nodes. What do
you do?
A. Use a relationship between two nodes, store the context as properties
B. Use a hyper edge
C. Model with multiple nodes but identify they belong together with a groupID


Answer at: r.neo4j.com/hunger-games
graphaware.com

@graph_aware

More Related Content

More from GraphAware

More from GraphAware (20)

Unparalleled Graph Database Scalability Delivered by Neo4j 4.0
Unparalleled Graph Database Scalability Delivered by Neo4j 4.0Unparalleled Graph Database Scalability Delivered by Neo4j 4.0
Unparalleled Graph Database Scalability Delivered by Neo4j 4.0
 
Challenges in knowledge graph visualization
Challenges in knowledge graph visualizationChallenges in knowledge graph visualization
Challenges in knowledge graph visualization
 
Social media monitoring with ML-powered Knowledge Graph
Social media monitoring with ML-powered Knowledge GraphSocial media monitoring with ML-powered Knowledge Graph
Social media monitoring with ML-powered Knowledge Graph
 
To be or not to be.
To be or not to be. To be or not to be.
To be or not to be.
 
How Boston Scientific Improves Manufacturing Quality Using Graph Analytics
How Boston Scientific Improves Manufacturing Quality Using Graph AnalyticsHow Boston Scientific Improves Manufacturing Quality Using Graph Analytics
How Boston Scientific Improves Manufacturing Quality Using Graph Analytics
 
When privacy matters! Chatbots in data-sensitive businesses
When privacy matters! Chatbots in data-sensitive businessesWhen privacy matters! Chatbots in data-sensitive businesses
When privacy matters! Chatbots in data-sensitive businesses
 
Graph-Powered Machine Learning
Graph-Powered Machine LearningGraph-Powered Machine Learning
Graph-Powered Machine Learning
 
Signals from outer space
Signals from outer spaceSignals from outer space
Signals from outer space
 
Neo4j-Databridge: Enterprise-scale ETL for Neo4j
Neo4j-Databridge: Enterprise-scale ETL for Neo4jNeo4j-Databridge: Enterprise-scale ETL for Neo4j
Neo4j-Databridge: Enterprise-scale ETL for Neo4j
 
Graph-Powered Machine Learning
Graph-Powered Machine Learning Graph-Powered Machine Learning
Graph-Powered Machine Learning
 
(Big) Data Science
 (Big) Data Science (Big) Data Science
(Big) Data Science
 
Modelling Data in Neo4j (plus a few tips)
Modelling Data in Neo4j (plus a few tips)Modelling Data in Neo4j (plus a few tips)
Modelling Data in Neo4j (plus a few tips)
 
Intro to Neo4j (CZ)
Intro to Neo4j (CZ)Intro to Neo4j (CZ)
Intro to Neo4j (CZ)
 
Modelling Data as Graphs (Neo4j)
Modelling Data as Graphs (Neo4j)Modelling Data as Graphs (Neo4j)
Modelling Data as Graphs (Neo4j)
 
GraphAware Framework Intro
GraphAware Framework IntroGraphAware Framework Intro
GraphAware Framework Intro
 
Advanced Neo4j Use Cases with the GraphAware Framework
Advanced Neo4j Use Cases with the GraphAware FrameworkAdvanced Neo4j Use Cases with the GraphAware Framework
Advanced Neo4j Use Cases with the GraphAware Framework
 
Recommendations with Neo4j (FOSDEM 2015)
Recommendations with Neo4j (FOSDEM 2015)Recommendations with Neo4j (FOSDEM 2015)
Recommendations with Neo4j (FOSDEM 2015)
 
Machine Learning Powered by Graphs - Alessandro Negro
Machine Learning Powered by Graphs - Alessandro NegroMachine Learning Powered by Graphs - Alessandro Negro
Machine Learning Powered by Graphs - Alessandro Negro
 
Knowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe Willemsen
Knowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe WillemsenKnowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe Willemsen
Knowledge Graphs and Chatbots with Neo4j and IBM Watson - Christophe Willemsen
 
The power of polyglot searching
The power of polyglot searchingThe power of polyglot searching
The power of polyglot searching
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
Wonjun Hwang
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 

It Depends (and why it's the most frequent answer to modelling questions)

  • 1. GraphAware® It Depends… Luanne Misquitta
 VP of Engineering graphaware.com @graph_aware, @luannem and why it’s the most frequent answer to graph modelling questions
  • 2. The Data GraphAware® ‣ Movies ‣ Actors ‣ Directors ‣ Roles ‣ Genres
  • 4. Candidate Graph Model 1 GraphAware® Person name ACTED_IN DIRECTED roles:[“role1”,”role2”] Movie
 title
 genre
  • 5. Candidate Graph Model 2 GraphAware® Person
 name Movie
 title
 ACTED_IN DIRECTED roles:[“role1”,”role2”] Genre
 name
 HAS_GENRE
  • 6. Candidate Graph Model 3 GraphAware® Person
 name Movie
 [Genre]
 title
 ACTED_IN DIRECTED roles:[“role1”,”role2”]
  • 7. Candidate Graph Model 4 GraphAware® Person
 name Movie
 title
 Genre
 name
 Role
 name
 HAS_GENRE PLAYED_ROLE ROLE ROLE_IN_MOVIE DIRECTED
  • 9. Don’t be afraid! GraphAware® ‣ Graph modelling is an extremely useful exercise ‣ Validate your understanding of the problem on a whiteboard ‣ The way you naturally represent your domain on the whiteboard is generally your graph model ‣ No normalisation rules required- all stakeholders can participate ‣ Expose gaps in thinking, missing data early ‣ This modelling is beneficial even if you’re not using a graph database ‣ But if you draw it as a graph, and think of it as a graph, you probably need a graph database
  • 11. Now what? GraphAware® ‣ Should role be ‣ a property on a relationship? ‣ a node?
  • 12. Now what? GraphAware® ‣ Should genre be ‣ a property on a node? ‣ a node? ‣ a label? ‣ both?
  • 15. What is the question? GraphAware® ‣ The use case or the question you’re asking of the graph will determine the most suitable graph model to ‣ Answer the question ‣ Perform efficient queries ‣ Keep things simple- model just enough, but no more
  • 16. ‣ As a movie fan, I want to find a movie, and see actors and their roles Use case #1 GraphAware®
  • 17. ‣ As a movie fan, I want to find a movie, and see actors and their roles Use case #1 GraphAware® Person
 name Movie
 title
 genre ACTED_IN DIRECTED roles:[“role1”,”role2”]
  • 18. ‣ As a movie fan, I want to find movies in genres similar to my favourites Use case #2 GraphAware®
  • 19. ‣ As a movie fan, I want to find movies in genres similar to my favourites Use case #2 GraphAware® Person
 name Movie
 title
 ACTED_IN DIRECTED roles:[“role1”,”role2”] Genre
 name
 HAS_GENRE Movie
 title
 Genre
 name
 ACTED_IN HAS_GENRE SIMILAR_TO
  • 20. ‣ As a movie fan, I want to find actors who played the role of Neo and the awards they won for this role Use case #3 GraphAware®
  • 21. ‣ As a movie fan, I want to find actors who played the role of Neo and the awards they won for this role Use case #3 GraphAware® Person
 name Movie
 title
 DIRECTED Genre
 name
 HAS_GENRE Movie
 title
 Genre
 name
 ACTED_IN HAS_GENRE SIMILAR_TO Role
 name
 <hyperedge> Award
 name
 PLAYED_ROLE AWARD_ROLE ROLE ROLE_IN_MOVIEYear
  • 22. Summary GraphAware® ‣ Know thy use case ‣ Keep it simple and intuitive ‣ Consider ‣ the shape and size of your data ‣ the density of relationships ‣ selectivity ‣ read vs write trade-offs ‣ Measure performance but… ‣ Do not prematurely optimise- graph model refactoring is easy!
  • 23. Hunger Games GraphAware® 1. Easy: To be able to model your graph well, you should know A. Your use case B. The weather C. A list of hair-metal bands 2. Medium: Should I model this fact as a property of a node, or a node? A. Property of a node B. A node C. It depends 3. Hard: Sometimes you need an edge that relates more than 2 nodes. What do you do? A. Use a relationship between two nodes, store the context as properties B. Use a hyper edge C. Model with multiple nodes but identify they belong together with a groupID 
 Answer at: r.neo4j.com/hunger-games