SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Introduction to Neo4j -
a hands-on crash course
Michael Hunger
Developer Relations
@mesirii
dev.neo4j.com/forum
dev.neo4j.com/chat
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
This is an interactive session!
Tell us where you're from!
And please ask Questions
as we go along!
In any of the chats
Neo4j, Inc. All rights reserved 2022
In this session
We will cover:
• What is a graph and why they are amazing
• Spotting good graph scenarios
• Property graph database anatomy and introduction to Cypher
• Hands-on: the movie graph on Neo4j AuraDB Free
◦ dev.neo4j.com/aura-login
• Sneak peek: stackoverflow data
• Continuing your graph journey
Useful reference: https://dev.neo4j.com/rdbms-gdb
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Because it takes a few minutes to launch
Let's get started on
AuraDB Free
dev.neo4j.com/aura-login
Ask in the chat if something doesn't work!
Neo4j, Inc. All rights reserved 2022
Time to have a go! With AuraDB Free
We are going to:
1. Go to dev.neo4j.com/aura-login
2. Sign in & click “Create a database”
3. Selected “AuraDB Free” database size
4. Give your database a name
5. Select a Region
6. Select Movies Database
7. Click “Create Database”
8. Make a copy of the generated password - keep it safe!
9. Wait for 3-5 minutes
Can’t access Aura Free? No problem! Use Neo4j Sandbox:
• Go to dev.neo4j.com/try
• Sign in & click “Blank sandbox”
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
What is a graph?
versus
Neo4j, Inc. All rights reserved 2022
A graph is...
...a set of discrete entities, each of which has some set of relationships with the
other entities
Seven Bridges of Konigsberg problem. Leonhard Euler, 1735
Neo4j, Inc. All rights reserved 2022
Anything can be a graph - do you have examples too?
the Internet a water molecule
H
O
H
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Why are graphs amazing?
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Follow the flow - buying trainers
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Panama, paradise, pandora papers:
simple model, powerful outcome
Neo4j, Inc. All rights reserved 2022
18
The ICIJ Investigations
data model...
Neo4j, Inc. All rights reserved 2022
Roses are red,
facebook is blue,
No mutual friends,
So who are you?
Neo4j, Inc. All rights reserved 2022
Friends of friends
...or co-actors of co-actors
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
What are good graph scenarios?
Neo4j, Inc. All rights reserved 2022
Scenario 1: Does our problem involve understanding relationships between
entities?
Identifying good graph scenarios
● Recommendations
● Fraud detection
● Finding duplicates
● Data lineage
● Social Networks
Neo4j, Inc. All rights reserved 2022
Scenario 2: Does the problem involve a lot of self-referencing to the same type
of entity?
Identifying good graph scenarios
● Organisational
hierarchies
● Access management
● Social influencers
● Friends of friends
Neo4j, Inc. All rights reserved 2022
Scenario 3: Does the problem explore relationships of varying or unknown
depth?
Identifying good graph scenarios
● Supply chain
visibility
● Bill of Materials
● Network
management
● Routing
Neo4j, Inc. All rights reserved 2022
Scenario 4: Does our problem involve discovering lots of different routes or
paths?
Identifying good graph scenarios
● Logistics and routing
● Infrastructure
management
● Dependency tracing
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
So what does a (property) graph
look like?
Neo4j, Inc. All rights reserved 2022
Node (Vertex)
● The main data element from which graphs are constructed
27
Graph components
Jane bike
Neo4j, Inc. All rights reserved 2022
28
Graph components
Node (Vertex)
● The main data element from which graphs are constructed
Relationship (Edge)
● A link between two nodes. Has:
○ Direction
○ Type
● A node without relationships is permitted. A relationship without nodes is not
Jane OWNS bike
Neo4j, Inc. All rights reserved 2022
29
Property graph database
Node (Vertex)
Relationship (Edge)
OWNS
Neo4j, Inc. All rights reserved 2022
30
Property graph database
Node (Vertex)
Relationship (Edge)
:Person :Bike
OWNS
Label
● Define node role (optional)
Neo4j, Inc. All rights reserved 2022
31
Property graph database
Node (Vertex)
Relationship (Edge)
:Person
:Vehicle
:Bike
OWNS
Label
● Define node role (optional)
● Can have more than one
Neo4j, Inc. All rights reserved 2022
32
Node (Vertex)
Relationship (Edge)
:Person OWNS
Label
● Define node role (optional)
● Can have more than one
Properties
● Enrich a node or relationship
● No need for nulls!
name: Jane make: Specialized
model: Crux Pro
since: 2018
Property graph database
:Vehicle
:Bike
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
And now query the graph
together!
Neo4j, Inc. All rights reserved 2022 34

Cypher
A pattern-matching query language made for graphs
Neo4j, Inc. All rights reserved 2022 35

Cypher
A pattern matching query language made for graphs
• Declarative
• Expressive
• Pattern-Matching
Neo4j, Inc. All rights reserved 2022 36

Cypher
A pattern matching query language made for graphs
• Declarative
• Expressive
• Pattern Matching
With ASCII ART ¯_(ツ)_/¯
Neo4j, Inc. All rights reserved 2022
dev.neo4j.com/refcard
Neo4j, Inc. All rights reserved 2022
Use MATCH to retrieve nodes
//Match all nodes
MATCH (n)
RETURN n;
Neo4j, Inc. All rights reserved 2022
Use MATCH to retrieve nodes
//Match all nodes
MATCH (n)
RETURN n;
//Match all nodes with a Person label
MATCH (n:Person)
RETURN n;
Neo4j, Inc. All rights reserved 2022
Use MATCH to retrieve nodes
//Match all nodes
MATCH (n)
RETURN n;
//Match all nodes with a Person label
MATCH (n:Person)
RETURN n;
//Match all nodes with a Person label and property name is "Tom Hanks"
MATCH (n:Person {name: "Tom Hanks"})
RETURN n;
Neo4j, Inc. All rights reserved 2022
//Return nodes with label Person and name property is "Tom Hanks" -
Inline
MATCH (p:Person {name: "Tom Hanks"}) //Only works with exact matches
RETURN p;
Use MATCH and properties to retrieve nodes
Neo4j, Inc. All rights reserved 2022
//Return nodes with label Person and name property is "Tom Hanks" -
Inline
MATCH (p:Person {name: "Tom Hanks"}) //Only works with exact matches
RETURN p;
//Return nodes with label Person and name property equals "Tom Hanks"
MATCH (p:Person)
WHERE p.name = "Tom Hanks"
RETURN p;
Use MATCH and properties to retrieve nodes
Neo4j, Inc. All rights reserved 2022
//Return nodes with label Person and name property is "Tom Hanks" -
Inline
MATCH (p:Person {name: "Tom Hanks"}) //Only works with exact matches
RETURN p;
//Return nodes with label Person and name property equals "Tom Hanks"
MATCH (p:Person)
WHERE p.name = "Tom Hanks"
RETURN p;
//Return nodes with label Movie, released property is between 1991 and
1999
MATCH (m:Movie)
WHERE m.released > 1990 AND m.released < 2000
RETURN m;
Use MATCH and properties to retrieve nodes
Neo4j, Inc. All rights reserved 2022
Extending the MATCH
Neo4j, Inc. All rights reserved 2022
//Find all the movies Tom Hanks is connected to
MATCH (:Person {name:"Tom Hanks"})--(m:Movie)
RETURN m.title;
Extending the MATCH
Neo4j, Inc. All rights reserved 2022
//Find all the movies Tom Hanks is connected to
MATCH (:Person {name:"Tom Hanks"})--(m:Movie)
RETURN m.title;
//Find all the movies Tom Hanks directed and order by latest movie
MATCH (:Person {name:"Tom Hanks"})-[:DIRECTED]->(m:Movie)
RETURN m.title, m.released ORDER BY m.released DESC;
Extending the MATCH
Neo4j, Inc. All rights reserved 2022
//Find all the movies Tom Hanks is connected to
MATCH (:Person {name:"Tom Hanks"})--(m:Movie)
RETURN m.title;
//Find all the movies Tom Hanks directed and order by latest movie
MATCH (:Person {name:"Tom Hanks"})-[:DIRECTED]->(m:Movie)
RETURN m.title, m.released ORDER BY m.released DESC;
//Find all of the co-actors Tom Hanks have worked with
MATCH (:Person {name:"Tom Hanks"})-->(:Movie)<-[:ACTED_IN]-(coActor:Person)
RETURN coActor.name;
Extending the MATCH
Neo4j, Inc. All rights reserved 2022
//Uniquely create a person node called "Tom Hanks"
MERGE (p:Person {name:"Tom Hanks"});
MERGE
Neo4j, Inc. All rights reserved 2022
//Create a person node called "Tom Hanks"
MERGE (p:Person {name:"Tom Hanks"});
//Create an ACTED_IN relationship between "Tom Hanks" and "Apollo 13"
MATCH (p:Person {name:"Tom Hanks"}), (m:Movie {title:"Apollo 13"})
MERGE (p)-[:ACTED_IN]->(m);
MERGE
Neo4j, Inc. All rights reserved 2022
Nodes and relationships at a glance
Description Node Relationship
Generic () -- --> -[]-
With a reference (n) -[r]-
With a node label or rel
type
(:Person) -[:ACTED_IN]-
With a label/type and an
inline property
(:Person {name: 'Bob'}) -[:ACTED_IN {role: 'Dave'}]-
With a variable,
label/type and an inline
property
(p:Person {name: 'Bob'})
-[r:ACTED_IN {role:
'Rob'}]-
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Stackoverflow Demo
:play sandbox/stackoverflow
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
What Else is There?
Neo4j, Inc. All rights reserved 2022
Connectors
• Spark
• Kafka
• JDBC
What else is there?
Drivers
• Python
• JavaScript
• Java
• .Net
• Go
Data Science
• Graph Data Science Library
• Bloom Visualization
Libraries / Integrations
• neo4j/graphql
• Spring Data Neo4j
• neosemantics (RDF)
• APOC (utility)
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
So how do I continue my graph
journey?
Neo4j, Inc. All rights reserved 2022
A training class each week - Tuesdays, 3pm UTC
09 Mar: Getting Started with Neo4j
Bloom
16 Mar: Build APIs with Neo4j
GraphQL Library
23 Mar: Create a Knowledge
Graph: A Simple ML Approach
Read all about it!
dev.neo4j.com/training
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Free online training and
certification:
• dev.neo4j.com/learn
• dev.neo4j.com/datasets
How to, best practices, hands on
and community stories:
• dev.neo4j.com/videos
Come say hello :)
• dev.neo4j.com/chat
• dev.neo4j.com/forum
Continue your journey
Neo4j, Inc. All rights reserved 2022
Neo4j, Inc. All rights reserved 2022
Michael Hunger
Developer Relations
@mesirii
michael@neo4j.com
Join the conversation at dev.neo4j.com/forum

Más contenido relacionado

La actualidad más candente

Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science
Neo4j
 
Training Week: Introduction to Neo4j Bloom 2022
Training Week: Introduction to Neo4j Bloom 2022Training Week: Introduction to Neo4j Bloom 2022
Training Week: Introduction to Neo4j Bloom 2022
Neo4j
 
The Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent ApplicationsThe Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent Applications
Neo4j
 
Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach
Neo4j
 

La actualidad más candente (20)

Workshop - Build a Graph Solution
Workshop - Build a Graph SolutionWorkshop - Build a Graph Solution
Workshop - Build a Graph Solution
 
Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science Graphs for Finance - AML with Neo4j Graph Data Science
Graphs for Finance - AML with Neo4j Graph Data Science
 
A Universe of Knowledge Graphs
A Universe of Knowledge GraphsA Universe of Knowledge Graphs
A Universe of Knowledge Graphs
 
Knowledge Graphs and Generative AI
Knowledge Graphs and Generative AIKnowledge Graphs and Generative AI
Knowledge Graphs and Generative AI
 
ntroducing to the Power of Graph Technology
ntroducing to the Power of Graph Technologyntroducing to the Power of Graph Technology
ntroducing to the Power of Graph Technology
 
Training Week: Introduction to Neo4j Bloom 2022
Training Week: Introduction to Neo4j Bloom 2022Training Week: Introduction to Neo4j Bloom 2022
Training Week: Introduction to Neo4j Bloom 2022
 
How Expedia’s Entity Graph Powers Global Travel
How Expedia’s Entity Graph Powers Global TravelHow Expedia’s Entity Graph Powers Global Travel
How Expedia’s Entity Graph Powers Global Travel
 
Workshop Introduction to Neo4j
Workshop Introduction to Neo4jWorkshop Introduction to Neo4j
Workshop Introduction to Neo4j
 
The Knowledge Graph Explosion
The Knowledge Graph ExplosionThe Knowledge Graph Explosion
The Knowledge Graph Explosion
 
The path to success with graph database and graph data science_ Neo4j GraphSu...
The path to success with graph database and graph data science_ Neo4j GraphSu...The path to success with graph database and graph data science_ Neo4j GraphSu...
The path to success with graph database and graph data science_ Neo4j GraphSu...
 
Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...
Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...
Optimizing the Supply Chain with Knowledge Graphs, IoT and Digital Twins_Moor...
 
How Graph Algorithms Answer your Business Questions in Banking and Beyond
How Graph Algorithms Answer your Business Questions in Banking and BeyondHow Graph Algorithms Answer your Business Questions in Banking and Beyond
How Graph Algorithms Answer your Business Questions in Banking and Beyond
 
The Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent ApplicationsThe Data Platform for Today’s Intelligent Applications
The Data Platform for Today’s Intelligent Applications
 
Optimizing Your Supply Chain with the Neo4j Graph
Optimizing Your Supply Chain with the Neo4j GraphOptimizing Your Supply Chain with the Neo4j Graph
Optimizing Your Supply Chain with the Neo4j Graph
 
Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Full Stack Graph in the Cloud
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the Cloud
 
Intro to Neo4j
Intro to Neo4jIntro to Neo4j
Intro to Neo4j
 
Neo4j y GenAI
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 

Similar a Training Week: Introduction to Neo4j 2022

Introduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseIntroduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash course
Neo4j
 
Introduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseIntroduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash course
Neo4j
 

Similar a Training Week: Introduction to Neo4j 2022 (20)

Introduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseIntroduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash course
 
Training Week: Introduction to Neo4j
Training Week: Introduction to Neo4jTraining Week: Introduction to Neo4j
Training Week: Introduction to Neo4j
 
Training Series - Intro to Neo4j
Training Series - Intro to Neo4jTraining Series - Intro to Neo4j
Training Series - Intro to Neo4j
 
Introduction to Cypher.pptx
Introduction to Cypher.pptxIntroduction to Cypher.pptx
Introduction to Cypher.pptx
 
Road to NODES Workshop Series - Intro to Neo4j
Road to NODES Workshop Series - Intro to Neo4jRoad to NODES Workshop Series - Intro to Neo4j
Road to NODES Workshop Series - Intro to Neo4j
 
Introduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash courseIntroduction to Neo4j - a hands-on crash course
Introduction to Neo4j - a hands-on crash course
 
Introduction to neo4j - a hands-on crash course
Introduction to neo4j - a hands-on crash courseIntroduction to neo4j - a hands-on crash course
Introduction to neo4j - a hands-on crash course
 
Training di Base Neo4j
Training di Base Neo4jTraining di Base Neo4j
Training di Base Neo4j
 
Graph Data Modeling Best Practices(Eric_Monk).pptx
Graph Data Modeling Best Practices(Eric_Monk).pptxGraph Data Modeling Best Practices(Eric_Monk).pptx
Graph Data Modeling Best Practices(Eric_Monk).pptx
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge Graphs
 
Getting the Most From Today's Java Tooling With Neo4j
Getting the Most From Today's Java Tooling With Neo4jGetting the Most From Today's Java Tooling With Neo4j
Getting the Most From Today's Java Tooling With Neo4j
 
Einblicke ins Dickicht der Parteiprogramme
Einblicke ins Dickicht der ParteiprogrammeEinblicke ins Dickicht der Parteiprogramme
Einblicke ins Dickicht der Parteiprogramme
 
Real-time Data Updates for Neo4j Using GraphQL Subscriptions
Real-time Data Updates for Neo4j Using GraphQL SubscriptionsReal-time Data Updates for Neo4j Using GraphQL Subscriptions
Real-time Data Updates for Neo4j Using GraphQL Subscriptions
 
Master Real-Time Streams With Neo4j and Apache Kafka
Master Real-Time Streams With Neo4j and Apache KafkaMaster Real-Time Streams With Neo4j and Apache Kafka
Master Real-Time Streams With Neo4j and Apache Kafka
 
Neo4j GraphSummit Copenhagen - The path to success with Graph Database and Gr...
Neo4j GraphSummit Copenhagen - The path to success with Graph Database and Gr...Neo4j GraphSummit Copenhagen - The path to success with Graph Database and Gr...
Neo4j GraphSummit Copenhagen - The path to success with Graph Database and Gr...
 
How to Import JSON Using Cypher and APOC
How to Import JSON Using Cypher and APOCHow to Import JSON Using Cypher and APOC
How to Import JSON Using Cypher and APOC
 
Neo4j Drivers Best Practices
Neo4j Drivers Best PracticesNeo4j Drivers Best Practices
Neo4j Drivers Best Practices
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
MongoDB and DigitalOcean Automation with Cloud Manager
MongoDB and DigitalOcean Automation with Cloud ManagerMongoDB and DigitalOcean Automation with Cloud Manager
MongoDB and DigitalOcean Automation with Cloud Manager
 
Hands on Training – Graph Database with Neo4j
Hands on Training – Graph Database with Neo4jHands on Training – Graph Database with Neo4j
Hands on Training – Graph Database with Neo4j
 

Más de Neo4j

Más de Neo4j (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansQIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
 
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafosBBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
 
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdfRabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)
 
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
 
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
 
Neo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with GraphNeo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with Graph
 
SWIFT: Maintaining Critical Standards in the Financial Services Industry with...
SWIFT: Maintaining Critical Standards in the Financial Services Industry with...SWIFT: Maintaining Critical Standards in the Financial Services Industry with...
SWIFT: Maintaining Critical Standards in the Financial Services Industry with...
 
Deloitte & Red Cross: Talk to your data with Knowledge-enriched Generative AI
Deloitte & Red Cross: Talk to your data with Knowledge-enriched Generative AIDeloitte & Red Cross: Talk to your data with Knowledge-enriched Generative AI
Deloitte & Red Cross: Talk to your data with Knowledge-enriched Generative AI
 

Último

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Último (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 

Training Week: Introduction to Neo4j 2022

  • 1. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Introduction to Neo4j - a hands-on crash course Michael Hunger Developer Relations @mesirii dev.neo4j.com/forum dev.neo4j.com/chat
  • 2. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 This is an interactive session! Tell us where you're from! And please ask Questions as we go along! In any of the chats
  • 3. Neo4j, Inc. All rights reserved 2022 In this session We will cover: • What is a graph and why they are amazing • Spotting good graph scenarios • Property graph database anatomy and introduction to Cypher • Hands-on: the movie graph on Neo4j AuraDB Free ◦ dev.neo4j.com/aura-login • Sneak peek: stackoverflow data • Continuing your graph journey Useful reference: https://dev.neo4j.com/rdbms-gdb
  • 4. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Because it takes a few minutes to launch Let's get started on AuraDB Free dev.neo4j.com/aura-login Ask in the chat if something doesn't work!
  • 5. Neo4j, Inc. All rights reserved 2022 Time to have a go! With AuraDB Free We are going to: 1. Go to dev.neo4j.com/aura-login 2. Sign in & click “Create a database” 3. Selected “AuraDB Free” database size 4. Give your database a name 5. Select a Region 6. Select Movies Database 7. Click “Create Database” 8. Make a copy of the generated password - keep it safe! 9. Wait for 3-5 minutes Can’t access Aura Free? No problem! Use Neo4j Sandbox: • Go to dev.neo4j.com/try • Sign in & click “Blank sandbox”
  • 6. Neo4j, Inc. All rights reserved 2022
  • 7. Neo4j, Inc. All rights reserved 2022
  • 8. Neo4j, Inc. All rights reserved 2022
  • 9. Neo4j, Inc. All rights reserved 2022
  • 10. Neo4j, Inc. All rights reserved 2022
  • 11. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 What is a graph? versus
  • 12. Neo4j, Inc. All rights reserved 2022 A graph is... ...a set of discrete entities, each of which has some set of relationships with the other entities Seven Bridges of Konigsberg problem. Leonhard Euler, 1735
  • 13. Neo4j, Inc. All rights reserved 2022 Anything can be a graph - do you have examples too? the Internet a water molecule H O H
  • 14. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Why are graphs amazing?
  • 15. Neo4j, Inc. All rights reserved 2022
  • 16. Neo4j, Inc. All rights reserved 2022 Follow the flow - buying trainers
  • 17. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Panama, paradise, pandora papers: simple model, powerful outcome
  • 18. Neo4j, Inc. All rights reserved 2022 18 The ICIJ Investigations data model...
  • 19. Neo4j, Inc. All rights reserved 2022 Roses are red, facebook is blue, No mutual friends, So who are you?
  • 20. Neo4j, Inc. All rights reserved 2022 Friends of friends ...or co-actors of co-actors
  • 21. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 What are good graph scenarios?
  • 22. Neo4j, Inc. All rights reserved 2022 Scenario 1: Does our problem involve understanding relationships between entities? Identifying good graph scenarios ● Recommendations ● Fraud detection ● Finding duplicates ● Data lineage ● Social Networks
  • 23. Neo4j, Inc. All rights reserved 2022 Scenario 2: Does the problem involve a lot of self-referencing to the same type of entity? Identifying good graph scenarios ● Organisational hierarchies ● Access management ● Social influencers ● Friends of friends
  • 24. Neo4j, Inc. All rights reserved 2022 Scenario 3: Does the problem explore relationships of varying or unknown depth? Identifying good graph scenarios ● Supply chain visibility ● Bill of Materials ● Network management ● Routing
  • 25. Neo4j, Inc. All rights reserved 2022 Scenario 4: Does our problem involve discovering lots of different routes or paths? Identifying good graph scenarios ● Logistics and routing ● Infrastructure management ● Dependency tracing
  • 26. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 So what does a (property) graph look like?
  • 27. Neo4j, Inc. All rights reserved 2022 Node (Vertex) ● The main data element from which graphs are constructed 27 Graph components Jane bike
  • 28. Neo4j, Inc. All rights reserved 2022 28 Graph components Node (Vertex) ● The main data element from which graphs are constructed Relationship (Edge) ● A link between two nodes. Has: ○ Direction ○ Type ● A node without relationships is permitted. A relationship without nodes is not Jane OWNS bike
  • 29. Neo4j, Inc. All rights reserved 2022 29 Property graph database Node (Vertex) Relationship (Edge) OWNS
  • 30. Neo4j, Inc. All rights reserved 2022 30 Property graph database Node (Vertex) Relationship (Edge) :Person :Bike OWNS Label ● Define node role (optional)
  • 31. Neo4j, Inc. All rights reserved 2022 31 Property graph database Node (Vertex) Relationship (Edge) :Person :Vehicle :Bike OWNS Label ● Define node role (optional) ● Can have more than one
  • 32. Neo4j, Inc. All rights reserved 2022 32 Node (Vertex) Relationship (Edge) :Person OWNS Label ● Define node role (optional) ● Can have more than one Properties ● Enrich a node or relationship ● No need for nulls! name: Jane make: Specialized model: Crux Pro since: 2018 Property graph database :Vehicle :Bike
  • 33. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 And now query the graph together!
  • 34. Neo4j, Inc. All rights reserved 2022 34  Cypher A pattern-matching query language made for graphs
  • 35. Neo4j, Inc. All rights reserved 2022 35  Cypher A pattern matching query language made for graphs • Declarative • Expressive • Pattern-Matching
  • 36. Neo4j, Inc. All rights reserved 2022 36  Cypher A pattern matching query language made for graphs • Declarative • Expressive • Pattern Matching With ASCII ART ¯_(ツ)_/¯
  • 37. Neo4j, Inc. All rights reserved 2022 dev.neo4j.com/refcard
  • 38. Neo4j, Inc. All rights reserved 2022 Use MATCH to retrieve nodes //Match all nodes MATCH (n) RETURN n;
  • 39. Neo4j, Inc. All rights reserved 2022 Use MATCH to retrieve nodes //Match all nodes MATCH (n) RETURN n; //Match all nodes with a Person label MATCH (n:Person) RETURN n;
  • 40. Neo4j, Inc. All rights reserved 2022 Use MATCH to retrieve nodes //Match all nodes MATCH (n) RETURN n; //Match all nodes with a Person label MATCH (n:Person) RETURN n; //Match all nodes with a Person label and property name is "Tom Hanks" MATCH (n:Person {name: "Tom Hanks"}) RETURN n;
  • 41. Neo4j, Inc. All rights reserved 2022 //Return nodes with label Person and name property is "Tom Hanks" - Inline MATCH (p:Person {name: "Tom Hanks"}) //Only works with exact matches RETURN p; Use MATCH and properties to retrieve nodes
  • 42. Neo4j, Inc. All rights reserved 2022 //Return nodes with label Person and name property is "Tom Hanks" - Inline MATCH (p:Person {name: "Tom Hanks"}) //Only works with exact matches RETURN p; //Return nodes with label Person and name property equals "Tom Hanks" MATCH (p:Person) WHERE p.name = "Tom Hanks" RETURN p; Use MATCH and properties to retrieve nodes
  • 43. Neo4j, Inc. All rights reserved 2022 //Return nodes with label Person and name property is "Tom Hanks" - Inline MATCH (p:Person {name: "Tom Hanks"}) //Only works with exact matches RETURN p; //Return nodes with label Person and name property equals "Tom Hanks" MATCH (p:Person) WHERE p.name = "Tom Hanks" RETURN p; //Return nodes with label Movie, released property is between 1991 and 1999 MATCH (m:Movie) WHERE m.released > 1990 AND m.released < 2000 RETURN m; Use MATCH and properties to retrieve nodes
  • 44. Neo4j, Inc. All rights reserved 2022 Extending the MATCH
  • 45. Neo4j, Inc. All rights reserved 2022 //Find all the movies Tom Hanks is connected to MATCH (:Person {name:"Tom Hanks"})--(m:Movie) RETURN m.title; Extending the MATCH
  • 46. Neo4j, Inc. All rights reserved 2022 //Find all the movies Tom Hanks is connected to MATCH (:Person {name:"Tom Hanks"})--(m:Movie) RETURN m.title; //Find all the movies Tom Hanks directed and order by latest movie MATCH (:Person {name:"Tom Hanks"})-[:DIRECTED]->(m:Movie) RETURN m.title, m.released ORDER BY m.released DESC; Extending the MATCH
  • 47. Neo4j, Inc. All rights reserved 2022 //Find all the movies Tom Hanks is connected to MATCH (:Person {name:"Tom Hanks"})--(m:Movie) RETURN m.title; //Find all the movies Tom Hanks directed and order by latest movie MATCH (:Person {name:"Tom Hanks"})-[:DIRECTED]->(m:Movie) RETURN m.title, m.released ORDER BY m.released DESC; //Find all of the co-actors Tom Hanks have worked with MATCH (:Person {name:"Tom Hanks"})-->(:Movie)<-[:ACTED_IN]-(coActor:Person) RETURN coActor.name; Extending the MATCH
  • 48. Neo4j, Inc. All rights reserved 2022 //Uniquely create a person node called "Tom Hanks" MERGE (p:Person {name:"Tom Hanks"}); MERGE
  • 49. Neo4j, Inc. All rights reserved 2022 //Create a person node called "Tom Hanks" MERGE (p:Person {name:"Tom Hanks"}); //Create an ACTED_IN relationship between "Tom Hanks" and "Apollo 13" MATCH (p:Person {name:"Tom Hanks"}), (m:Movie {title:"Apollo 13"}) MERGE (p)-[:ACTED_IN]->(m); MERGE
  • 50. Neo4j, Inc. All rights reserved 2022 Nodes and relationships at a glance Description Node Relationship Generic () -- --> -[]- With a reference (n) -[r]- With a node label or rel type (:Person) -[:ACTED_IN]- With a label/type and an inline property (:Person {name: 'Bob'}) -[:ACTED_IN {role: 'Dave'}]- With a variable, label/type and an inline property (p:Person {name: 'Bob'}) -[r:ACTED_IN {role: 'Rob'}]-
  • 51. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Stackoverflow Demo :play sandbox/stackoverflow
  • 52. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 What Else is There?
  • 53. Neo4j, Inc. All rights reserved 2022 Connectors • Spark • Kafka • JDBC What else is there? Drivers • Python • JavaScript • Java • .Net • Go Data Science • Graph Data Science Library • Bloom Visualization Libraries / Integrations • neo4j/graphql • Spring Data Neo4j • neosemantics (RDF) • APOC (utility)
  • 54. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 So how do I continue my graph journey?
  • 55. Neo4j, Inc. All rights reserved 2022 A training class each week - Tuesdays, 3pm UTC 09 Mar: Getting Started with Neo4j Bloom 16 Mar: Build APIs with Neo4j GraphQL Library 23 Mar: Create a Knowledge Graph: A Simple ML Approach Read all about it! dev.neo4j.com/training
  • 56. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Free online training and certification: • dev.neo4j.com/learn • dev.neo4j.com/datasets How to, best practices, hands on and community stories: • dev.neo4j.com/videos Come say hello :) • dev.neo4j.com/chat • dev.neo4j.com/forum Continue your journey
  • 57. Neo4j, Inc. All rights reserved 2022 Neo4j, Inc. All rights reserved 2022 Michael Hunger Developer Relations @mesirii michael@neo4j.com Join the conversation at dev.neo4j.com/forum