SlideShare une entreprise Scribd logo
1  sur  15
Graph Technology
Neo4J
The Story – If Seeing is Believing, The Unseen is Unknown
The Motivation
Several groups and individuals independently have approached me
concerning several issues all which have a common theme. They are
Graph Based.
I started on my own to relearn and research this topic from Long
Ago, in a City, Far Far Away.
This is the First of Many Classes I am Putting Together for Us in
Hopes of Making a Real Difference for All Of Us.
If Seeing is Believing, The Unseen is Unknown
Find the Force, Learn to See What You Can Not See Now, It will Guild Your Path
The Major Player in Data and Discovery
It is NOT our intent to
play one database structure
off of another, but to
augment our
understanding, and tool
selection, to use the right
tool for the right job.
Not all problems are
represented well in Rows
and Columns, nor in Key-
Value maps, some are
relationship based.
In most cases, a design, or its
refinement, starts with a
whiteboard drawing.
Our nature is to draw components
and their relationships to each
other.
The next step for both relational
and NOSQL platforms is to
convert this diagram into their
respective paradigms.
For such problems, a native graph
solution is the best approach.
Understanding such a platform is
the purpose of these courses.
Graphs Are Whiteboard Friendly
What is a Graph, What Are the Components
Rows and Columns for Relational,
Keys mapping to a Structure for
NOSQL, what are the components of
a Graph Database.?
They are relatively simple and
intuitive. We call this thinking
‘Whiteboard Friendly’. There is no
‘conversion’ to an underlying
paradigm. The underlying paradigm
matches our natural way of thinking
and understanding the problem.
A Graph Database thinks as we do. As
we will see, there are many
advantages to this approach and the
underlying technology of a native
graph solution.
Not all graph databases are native graph, some are abstractions over relational or key-values databases
Graphs are Whiteboard Friendly
Understand Patterns is Key to Seeing the Unseen A Light Onto My Path
Patterns are 90 % of the foundational
building blocks of a graph. Understanding
a graph is simple, and intuitive.
A Node can be of any type, person, place,
thing, etc. Nodes have relationships to each
other, forming a graph.
We have invented, using standard text, Art
which visually describes these components,
we call it ASCII Art.
A Node has one or more types which we
call a Label. Nodes can also have
Properties.
Nodes are joined through Relationships
which are also named. Relationships can
have a direction but are always stored
bidirectionally.
Cypher Commands are Declarative in Nature A Lamp Onto My Feet
Understanding Patterns is the key, they
are universally used across all of
Cypher, the declarative language used by
the leading graph database technology,
Neo4J.
Declarative means that through patterns
we specify ‘What We Want’ instead of
‘How to Create or Find It’. There is no
concept of schema.
The three most important commands to
understand is how to Create a path
(nodes & relationships) and how to
Match a graph element (node,
relationship, path, etc.)
These commands form the foundation
of Neo4J and they are all based on the
Patterns we have shown.
From Whiteboard to Graph A SimpleVisual Grammar
many ways to visualize and
explore a graph in Neo4J, but this
is basically what you will see. A
simple visual grammar has been
presented in the Legend of this
diagram. Circles are Nodes, lines
are Relati0onships, which are
bidirectional internally, and
Labels are show in gray
rectangles.
Here is what
our original
graph would
look like from
our opening
slide.There are
Expanding Existing Graphs is Easy
Whiteboard Friendly means no
abstractions exist between the vision, and
the underlying mechanics of a native graph
solution.
Model changes are frequent in projects
but, unlike schema-based solution, are
easily performed, either through adding
new node and relationships, or refactoring
existing ones.
In this model, we are adding the Software
Licenses held by each Member. When a
project ends, those licenses can easily be
reclaimed, and made available for others.
This graph also makes it easy to explore
and adhere to our license agreements.
No schema changes, no rewrites or
modifications to existing code, everything
is easily understood and maps to our native
thinking.
Some Requirements are Hierarchical in Nature
Sometimes solutions are
hierarchical in nature, as
in the case of who
reports to whom, etc.
Graphs are perfectly
positioned to handle
such scenarios.
A few simple Cypher
statements, or loading
from an external
resource through prebuilt
adapters, builds out the
graph structure easily.
Notice that nodes can
have multiple labels
(types Boss and
Manager).
Sometimes Structures are Complex
Graphs Simplify Seeing the Unseen Graph Solution and Our Current Mechanism
Let’s compare the effort in
processing a simple
hierarchical request between a
graph solution and our current
mechanism.
Here is all the Cypher code
required to find the reports
for each manager three level
deep and generate a report.
We are also showing the SQL
stored procedure written by a
very skilled person to
accomplish the same task
which is over two pages.
Using one of the many visual
engines that comes with
Neo4J this could even be done
without Cypher.
Performance Comparisons
Let compare our current mechanisms
against graph technology. Let’s increase
the number of people in a social graph
and compare. Then, let’s preform a
comparison of depth searches, two
common operations in any solution.
Index Free Adjacency: Because there
are no indexes between nodes.
Relationships are stored natively in the
graph itself at time of creation,
therefore no compute (table scanning,
indexes and foreign keys) is required to
traverse the structure. Also, because the
structure is self-contained it can reside,
as is, in cache. Notice: unlike our
current solutions, increasing the
Number of People by 1000 times, or
depth, has no, or very little, effect on
performance.
Index Free Adjacency: There is no Spoon
Ideas of Graphy Problems AnytimeYou See A ‘This is Related toThat’,Think Graph
I am just one
person, one
perspective, with
limited
understanding.
These are only a
few of the areas
which I feel Graph
Theory can make a
real difference.
Anytime you see a
‘This is Related to
That’, think Graph.
Future Classes Your Needs Should Determine Our Future Courses
Just as needs should
determine the solutions,
your needs should
determine our future
courses. I have taken a
reasonable guess at
possible topics for the
next series of classes on
GraphTheory and Neo4J.
But the real decision is up
to you based on what
you need.
Certainly, a more in-
depth understanding of
Patterns and the Cypher
Language should be next
Thank You

Contenu connexe

Similaire à Intro to Graph Theory w Neo4J

Graph Databases and Graph Data Science in Neo4j
Graph Databases and Graph Data Science in Neo4jGraph Databases and Graph Data Science in Neo4j
Graph Databases and Graph Data Science in Neo4jijtsrd
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j PresentationMax De Marzi
 
Thinking about graphs
Thinking about graphsThinking about graphs
Thinking about graphsNeo4j
 
Thinking Through Visualization Tools
Thinking Through Visualization ToolsThinking Through Visualization Tools
Thinking Through Visualization ToolsSam Pottinger
 
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016Calin Constantinov
 
Designers are from Venus - Presentationas Given to CD2
Designers are from Venus - Presentationas Given to CD2Designers are from Venus - Presentationas Given to CD2
Designers are from Venus - Presentationas Given to CD2Chad Udell
 
visualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdf
visualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdfvisualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdf
visualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdfdimce3
 
Part C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docxPart C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docxsmile790243
 
3. Relationships Matter: Using Connected Data for Better Machine Learning
3. Relationships Matter: Using Connected Data for Better Machine Learning3. Relationships Matter: Using Connected Data for Better Machine Learning
3. Relationships Matter: Using Connected Data for Better Machine LearningNeo4j
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)Zoe Landon
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxDrYogeshDeshmukh1
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge GraphTrey Grainger
 
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018Calin Constantinov
 
CORE: Cognitive Organization for Requirements Elicitation
CORE: Cognitive Organization for Requirements ElicitationCORE: Cognitive Organization for Requirements Elicitation
CORE: Cognitive Organization for Requirements ElicitationScott M. Confer
 

Similaire à Intro to Graph Theory w Neo4J (20)

Graph Databases and Graph Data Science in Neo4j
Graph Databases and Graph Data Science in Neo4jGraph Databases and Graph Data Science in Neo4j
Graph Databases and Graph Data Science in Neo4j
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j Presentation
 
Thinking about graphs
Thinking about graphsThinking about graphs
Thinking about graphs
 
Thinking Through Visualization Tools
Thinking Through Visualization ToolsThinking Through Visualization Tools
Thinking Through Visualization Tools
 
DDD In Agile
DDD In Agile   DDD In Agile
DDD In Agile
 
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
Calin Constantinov - Neo4j - Keyboards and Mice - Craiova 2016
 
Introduction to data visualization
Introduction to data visualizationIntroduction to data visualization
Introduction to data visualization
 
Designers are from Venus - Presentationas Given to CD2
Designers are from Venus - Presentationas Given to CD2Designers are from Venus - Presentationas Given to CD2
Designers are from Venus - Presentationas Given to CD2
 
visualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdf
visualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdfvisualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdf
visualize data d83ae67f-6375-401f-b95a-f29eae37dd32.pdf
 
Part C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docxPart C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docx
 
3. Relationships Matter: Using Connected Data for Better Machine Learning
3. Relationships Matter: Using Connected Data for Better Machine Learning3. Relationships Matter: Using Connected Data for Better Machine Learning
3. Relationships Matter: Using Connected Data for Better Machine Learning
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
 
The Semantic Knowledge Graph
The Semantic Knowledge GraphThe Semantic Knowledge Graph
The Semantic Knowledge Graph
 
Know what is NOSQL
Know what is NOSQL Know what is NOSQL
Know what is NOSQL
 
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
Calin Constantinov - Neo4j - Bucharest Big Data Week Meetup - Bucharest 2018
 
Whatis neo4j
Whatis neo4jWhatis neo4j
Whatis neo4j
 
CORE: Cognitive Organization for Requirements Elicitation
CORE: Cognitive Organization for Requirements ElicitationCORE: Cognitive Organization for Requirements Elicitation
CORE: Cognitive Organization for Requirements Elicitation
 
Unit iii design patterns 9
Unit iii design patterns 9Unit iii design patterns 9
Unit iii design patterns 9
 
ML.pdf
ML.pdfML.pdf
ML.pdf
 

Dernier

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

Intro to Graph Theory w Neo4J

  • 2. The Story – If Seeing is Believing, The Unseen is Unknown The Motivation Several groups and individuals independently have approached me concerning several issues all which have a common theme. They are Graph Based. I started on my own to relearn and research this topic from Long Ago, in a City, Far Far Away. This is the First of Many Classes I am Putting Together for Us in Hopes of Making a Real Difference for All Of Us. If Seeing is Believing, The Unseen is Unknown Find the Force, Learn to See What You Can Not See Now, It will Guild Your Path
  • 3. The Major Player in Data and Discovery It is NOT our intent to play one database structure off of another, but to augment our understanding, and tool selection, to use the right tool for the right job. Not all problems are represented well in Rows and Columns, nor in Key- Value maps, some are relationship based.
  • 4. In most cases, a design, or its refinement, starts with a whiteboard drawing. Our nature is to draw components and their relationships to each other. The next step for both relational and NOSQL platforms is to convert this diagram into their respective paradigms. For such problems, a native graph solution is the best approach. Understanding such a platform is the purpose of these courses. Graphs Are Whiteboard Friendly
  • 5. What is a Graph, What Are the Components Rows and Columns for Relational, Keys mapping to a Structure for NOSQL, what are the components of a Graph Database.? They are relatively simple and intuitive. We call this thinking ‘Whiteboard Friendly’. There is no ‘conversion’ to an underlying paradigm. The underlying paradigm matches our natural way of thinking and understanding the problem. A Graph Database thinks as we do. As we will see, there are many advantages to this approach and the underlying technology of a native graph solution. Not all graph databases are native graph, some are abstractions over relational or key-values databases Graphs are Whiteboard Friendly
  • 6. Understand Patterns is Key to Seeing the Unseen A Light Onto My Path Patterns are 90 % of the foundational building blocks of a graph. Understanding a graph is simple, and intuitive. A Node can be of any type, person, place, thing, etc. Nodes have relationships to each other, forming a graph. We have invented, using standard text, Art which visually describes these components, we call it ASCII Art. A Node has one or more types which we call a Label. Nodes can also have Properties. Nodes are joined through Relationships which are also named. Relationships can have a direction but are always stored bidirectionally.
  • 7. Cypher Commands are Declarative in Nature A Lamp Onto My Feet Understanding Patterns is the key, they are universally used across all of Cypher, the declarative language used by the leading graph database technology, Neo4J. Declarative means that through patterns we specify ‘What We Want’ instead of ‘How to Create or Find It’. There is no concept of schema. The three most important commands to understand is how to Create a path (nodes & relationships) and how to Match a graph element (node, relationship, path, etc.) These commands form the foundation of Neo4J and they are all based on the Patterns we have shown.
  • 8. From Whiteboard to Graph A SimpleVisual Grammar many ways to visualize and explore a graph in Neo4J, but this is basically what you will see. A simple visual grammar has been presented in the Legend of this diagram. Circles are Nodes, lines are Relati0onships, which are bidirectional internally, and Labels are show in gray rectangles. Here is what our original graph would look like from our opening slide.There are
  • 9. Expanding Existing Graphs is Easy Whiteboard Friendly means no abstractions exist between the vision, and the underlying mechanics of a native graph solution. Model changes are frequent in projects but, unlike schema-based solution, are easily performed, either through adding new node and relationships, or refactoring existing ones. In this model, we are adding the Software Licenses held by each Member. When a project ends, those licenses can easily be reclaimed, and made available for others. This graph also makes it easy to explore and adhere to our license agreements. No schema changes, no rewrites or modifications to existing code, everything is easily understood and maps to our native thinking.
  • 10. Some Requirements are Hierarchical in Nature Sometimes solutions are hierarchical in nature, as in the case of who reports to whom, etc. Graphs are perfectly positioned to handle such scenarios. A few simple Cypher statements, or loading from an external resource through prebuilt adapters, builds out the graph structure easily. Notice that nodes can have multiple labels (types Boss and Manager). Sometimes Structures are Complex
  • 11. Graphs Simplify Seeing the Unseen Graph Solution and Our Current Mechanism Let’s compare the effort in processing a simple hierarchical request between a graph solution and our current mechanism. Here is all the Cypher code required to find the reports for each manager three level deep and generate a report. We are also showing the SQL stored procedure written by a very skilled person to accomplish the same task which is over two pages. Using one of the many visual engines that comes with Neo4J this could even be done without Cypher.
  • 12. Performance Comparisons Let compare our current mechanisms against graph technology. Let’s increase the number of people in a social graph and compare. Then, let’s preform a comparison of depth searches, two common operations in any solution. Index Free Adjacency: Because there are no indexes between nodes. Relationships are stored natively in the graph itself at time of creation, therefore no compute (table scanning, indexes and foreign keys) is required to traverse the structure. Also, because the structure is self-contained it can reside, as is, in cache. Notice: unlike our current solutions, increasing the Number of People by 1000 times, or depth, has no, or very little, effect on performance. Index Free Adjacency: There is no Spoon
  • 13. Ideas of Graphy Problems AnytimeYou See A ‘This is Related toThat’,Think Graph I am just one person, one perspective, with limited understanding. These are only a few of the areas which I feel Graph Theory can make a real difference. Anytime you see a ‘This is Related to That’, think Graph.
  • 14. Future Classes Your Needs Should Determine Our Future Courses Just as needs should determine the solutions, your needs should determine our future courses. I have taken a reasonable guess at possible topics for the next series of classes on GraphTheory and Neo4J. But the real decision is up to you based on what you need. Certainly, a more in- depth understanding of Patterns and the Cypher Language should be next