SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Graphs, Databases and what we can use them for
Michael Hackstein
@mchacki

November 6, 2013

c 2013 triAGENS GmbH | 2013-11-6
About me

Still Student (Master Informatik) at RWTH
Just handed in my thesis
Software developer at triAGENS GmbH, CGN
Part of the ArangoDB team

c 2013 triAGENS GmbH | 2013-11-6
Table of contents

1 Definition
2 Use Cases
3 Databases
4 Traversals
5 Visualisation

c 2013 triAGENS GmbH | 2013-11-6
What is a graph?
A set of arbitrary objects, called vertices

c 2013 triAGENS GmbH | 2013-11-6
What is a graph?
A set of arbitrary objects, called vertices
And a set of relations between them, called edges

c 2013 triAGENS GmbH | 2013-11-6
Formal Definition

Let V be the set of vertices
Let E ⊆ V × V be the set of edges
Define G = (V , E ) is a graph

c 2013 triAGENS GmbH | 2013-11-6
Formal Definition

Let V be the set of vertices
Let E ⊆ V × V be the set of edges
Define G = (V , E ) is a graph
Define δ + (n) =

v ∈V |(n,v )∈E

1 is the indegree of n ∈ V

Define δ − (n) =

1 is the outdegree of n ∈ V

Define δ(n) =

as the degree of n ∈ V

v ∈V |(v ,n)∈E
δ + (n) + δ − (n)

c 2013 triAGENS GmbH | 2013-11-6
Directed Graphs
Edges have a direction
One vertex is the source
The other vertex is the target
Formal: (a, b) ∈ E
(b, a) ∈ E
And (a, b) ∈ E ∧ (b, a) ∈ E ⇒ (a, b) = (b, a)

c
d

b
a

c 2013 triAGENS GmbH | 2013-11-6
Example: Navigation Systems

c 2013 triAGENS GmbH | 2013-11-6
Undirected Graphs
Edges do not have a direction
No vertex is source or target
Formal: (a, b) ∈ E ⇔ (b, a) ∈ E
And (a, b) ∈ E ∧ (b, a) ∈ E ⇒ (a, b) = (b, a)

c
d

b
a
c 2013 triAGENS GmbH | 2013-11-6
Example: Social Networks

Charly
Diana

Bob
Alice

c 2013 triAGENS GmbH | 2013-11-6
Property Graphs
Vertices have properties in addition to a label
Edges have properties in addition to a label

c 2013 triAGENS GmbH | 2013-11-6
Graphs in Relational Databases

m
Edge

Vertex
n

c 2013 triAGENS GmbH | 2013-11-6
Where else to store Graphs?

c 2013 triAGENS GmbH | 2013-11-6
How to store Graphs?

We will have an example using ArangoDB.
First Example: Create new database using Graphs API
DEMO TIME

c 2013 triAGENS GmbH | 2013-11-6
How to store Graphs?

Second Example: You already have vertices.
How to add edges?
DEMO TIME

c 2013 triAGENS GmbH | 2013-11-6
But what can we do with the data now?

c 2013 triAGENS GmbH | 2013-11-6
Queries on graphs

Mechanism to query a graph
Starts at one specific vertex
Searches all connected vertices
Searches children of these vertices
Until predefined boundary is reached
Order of vertices can be configured

c 2013 triAGENS GmbH | 2013-11-6
The visitor

Active at each searched vertex
Can execute queries on this vertex like collecting attributes
Does know the path followed to reach the current vertex
Does not know vertices that will be visited in future

c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 0 Nuts: 0
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 0 Nuts: 0
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 0 Nuts: 0
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 2 Nuts: 3
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 2 Nuts: 3
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 2 Nuts: 3
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 4 Nuts: 3
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 4 Nuts: 3
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 4 Nuts: 3
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 9 Nuts: 8
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 9 Nuts: 8
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 9 Nuts: 8
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 10 Nuts: 9
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 12 Nuts: 10
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 12 Nuts: 12
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 13 Nuts: 13
c 2013 triAGENS GmbH | 2013-11-6
Traversals
Grain: 0
Nuts: 0

Grain: 2
Nuts: 3

Grain: 0
Nuts: 2
Grain: 1
Nuts: 1

Grain: 2
Nuts: 0
Grain: 5
Nuts: 5

Grain: 1
Nuts: 1
Grain: 2
Nuts: 1

Grain: 8
Nuts: 9

Grain: 13 Nuts: 13 Done
c 2013 triAGENS GmbH | 2013-11-6
Traversals Live

Example: Execute traversal in ArangoDB
DEMO TIME

c 2013 triAGENS GmbH | 2013-11-6
Visualisation

Example: How to view the graph
DEMO TIME

c 2013 triAGENS GmbH | 2013-11-6

Mais conteúdo relacionado

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

GraphDatabases and what we can use them for

  • 1. Graphs, Databases and what we can use them for Michael Hackstein @mchacki November 6, 2013 c 2013 triAGENS GmbH | 2013-11-6
  • 2. About me Still Student (Master Informatik) at RWTH Just handed in my thesis Software developer at triAGENS GmbH, CGN Part of the ArangoDB team c 2013 triAGENS GmbH | 2013-11-6
  • 3. Table of contents 1 Definition 2 Use Cases 3 Databases 4 Traversals 5 Visualisation c 2013 triAGENS GmbH | 2013-11-6
  • 4. What is a graph? A set of arbitrary objects, called vertices c 2013 triAGENS GmbH | 2013-11-6
  • 5. What is a graph? A set of arbitrary objects, called vertices And a set of relations between them, called edges c 2013 triAGENS GmbH | 2013-11-6
  • 6. Formal Definition Let V be the set of vertices Let E ⊆ V × V be the set of edges Define G = (V , E ) is a graph c 2013 triAGENS GmbH | 2013-11-6
  • 7. Formal Definition Let V be the set of vertices Let E ⊆ V × V be the set of edges Define G = (V , E ) is a graph Define δ + (n) = v ∈V |(n,v )∈E 1 is the indegree of n ∈ V Define δ − (n) = 1 is the outdegree of n ∈ V Define δ(n) = as the degree of n ∈ V v ∈V |(v ,n)∈E δ + (n) + δ − (n) c 2013 triAGENS GmbH | 2013-11-6
  • 8. Directed Graphs Edges have a direction One vertex is the source The other vertex is the target Formal: (a, b) ∈ E (b, a) ∈ E And (a, b) ∈ E ∧ (b, a) ∈ E ⇒ (a, b) = (b, a) c d b a c 2013 triAGENS GmbH | 2013-11-6
  • 9. Example: Navigation Systems c 2013 triAGENS GmbH | 2013-11-6
  • 10. Undirected Graphs Edges do not have a direction No vertex is source or target Formal: (a, b) ∈ E ⇔ (b, a) ∈ E And (a, b) ∈ E ∧ (b, a) ∈ E ⇒ (a, b) = (b, a) c d b a c 2013 triAGENS GmbH | 2013-11-6
  • 11. Example: Social Networks Charly Diana Bob Alice c 2013 triAGENS GmbH | 2013-11-6
  • 12. Property Graphs Vertices have properties in addition to a label Edges have properties in addition to a label c 2013 triAGENS GmbH | 2013-11-6
  • 13. Graphs in Relational Databases m Edge Vertex n c 2013 triAGENS GmbH | 2013-11-6
  • 14. Where else to store Graphs? c 2013 triAGENS GmbH | 2013-11-6
  • 15. How to store Graphs? We will have an example using ArangoDB. First Example: Create new database using Graphs API DEMO TIME c 2013 triAGENS GmbH | 2013-11-6
  • 16. How to store Graphs? Second Example: You already have vertices. How to add edges? DEMO TIME c 2013 triAGENS GmbH | 2013-11-6
  • 17. But what can we do with the data now? c 2013 triAGENS GmbH | 2013-11-6
  • 18. Queries on graphs Mechanism to query a graph Starts at one specific vertex Searches all connected vertices Searches children of these vertices Until predefined boundary is reached Order of vertices can be configured c 2013 triAGENS GmbH | 2013-11-6
  • 19. The visitor Active at each searched vertex Can execute queries on this vertex like collecting attributes Does know the path followed to reach the current vertex Does not know vertices that will be visited in future c 2013 triAGENS GmbH | 2013-11-6
  • 20. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 c 2013 triAGENS GmbH | 2013-11-6
  • 21. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 0 Nuts: 0 c 2013 triAGENS GmbH | 2013-11-6
  • 22. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 0 Nuts: 0 c 2013 triAGENS GmbH | 2013-11-6
  • 23. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 0 Nuts: 0 c 2013 triAGENS GmbH | 2013-11-6
  • 24. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 2 Nuts: 3 c 2013 triAGENS GmbH | 2013-11-6
  • 25. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 2 Nuts: 3 c 2013 triAGENS GmbH | 2013-11-6
  • 26. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 2 Nuts: 3 c 2013 triAGENS GmbH | 2013-11-6
  • 27. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 4 Nuts: 3 c 2013 triAGENS GmbH | 2013-11-6
  • 28. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 4 Nuts: 3 c 2013 triAGENS GmbH | 2013-11-6
  • 29. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 4 Nuts: 3 c 2013 triAGENS GmbH | 2013-11-6
  • 30. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 9 Nuts: 8 c 2013 triAGENS GmbH | 2013-11-6
  • 31. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 9 Nuts: 8 c 2013 triAGENS GmbH | 2013-11-6
  • 32. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 9 Nuts: 8 c 2013 triAGENS GmbH | 2013-11-6
  • 33. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 10 Nuts: 9 c 2013 triAGENS GmbH | 2013-11-6
  • 34. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 12 Nuts: 10 c 2013 triAGENS GmbH | 2013-11-6
  • 35. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 12 Nuts: 12 c 2013 triAGENS GmbH | 2013-11-6
  • 36. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 13 Nuts: 13 c 2013 triAGENS GmbH | 2013-11-6
  • 37. Traversals Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 13 Nuts: 13 Done c 2013 triAGENS GmbH | 2013-11-6
  • 38. Traversals Live Example: Execute traversal in ArangoDB DEMO TIME c 2013 triAGENS GmbH | 2013-11-6
  • 39. Visualisation Example: How to view the graph DEMO TIME c 2013 triAGENS GmbH | 2013-11-6