SlideShare a Scribd company logo
Neo4j Makes Graphs Easy
Nicole White
@_nicolemargaret
Agenda
Model Import Query
Build an
App!
Model
NorthWind
What if we used SQL?
Categories
CategoryID
CategoryName
Suppliers
SupplierID
CompanyName
Products
ProductID
ProductName
CategoryID
SupplierID
Customers
CustomerID
CompanyName
Order Details
OrderID
ProductID
Orders
OrderID
CustomerID
ShipVia
EmployeeID
Employees
EmployeeID
FirstName
LastName
ReportsTo
Shippers
ShipperID
CompanyName
EmployeeTerritories
EmployeeID
TerritoryID
Territories
TerritoryID
TerritoryDescription
RegionID
Regions
RegionID
RegionDescription
What if we used Neo4j?
Orde
r
Product
Employe
e
Categor
y
Supplie
r
Custome
r
Shipper
Territory
Region
Employe
e
REPORTS TO
Product
Employe
e
REPORTS TO
Import
LOAD CSV
Export from SQL
SELECT * FROM Orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS ENCLOSED BY '"' TERMINATED BY ',' ESCAPED BY ''
LINES TERMINATED BY 'rn';
...
SELECT * FROM Products
INTO OUTFILE '/tmp/products.csv'
FIELDS ENCLOSED BY '"' TERMINATED BY ',' ESCAPED BY ''
LINES TERMINATED BY 'rn';
To The Browser!
Holy nodes
Batman!
Import into Neo4j
Query
Cypher Query Language
What are Steven
Buchanan’s top 5 selling
products?
SQL
SELECT Products.ProductName AS Product,
ROUND(SUM((`Order Details`.UnitPrice*Quantity*(1-Discount)/100)*100)) AS Sales
FROM Employees
JOIN Orders ON Employees.EmployeeID = Orders.EmployeeID
JOIN `Order Details` ON Orders.OrderID = `Order Details`.OrderID
JOIN Products ON `Order Details`.ProductID = Products.ProductID
WHERE Employees.FirstName = "Steven" AND Employees.LastName = "Buchanan"
GROUP BY Products.ProductName
ORDER BY Sales DESC LIMIT 5;
Output
+------------------------+-------+
° Product ° Sales °
+------------------------+-------+
° Cte de Blaye ° 8432 °
° Raclette Courdavault ° 7920 °
° Mozzarella di Giovanni ° 5829 °
° Alice Mutton ° 5538 °
° Perth Pasties ° 5084 °
+------------------------+-------+
Cypher
MATCH (e:Employee)-[:SOLD]->(:Order)-[r:INCLUDED]->(p:Product)
WHERE e.first_name = 'Steven' AND e.last_name = 'Buchanan'
RETURN p.name AS Product,
ROUND(SUM(r.unit_price*r.quantity*(1-r.discount)/100)*100) AS Sales
ORDER BY Sales DESC LIMIT 5;
Output
+-----------------------------------+
| Product | Sales |
+-----------------------------------+
| "Cte de Blaye" | 8432 |
| "Raclette Courdavault" | 7920 |
| "Mozzarella di Giovanni" | 5829 |
| "Alice Mutton" | 5538 |
| "Perth Pasties" | 5084 |
+-----------------------------------+
What is the reporting
structure two levels deep?
SQL
SELECT CONCAT(Employees.FirstName, ' ', Employees.LastName) AS Name,
CONCAT(e2.FirstName, ' ', e2.LastName) AS Manager,
CONCAT(e3.FirstName, ' ', e3.LastName) AS `Manager's Manager`
FROM Employees
JOIN Employees AS e2 ON Employees.ReportsTo = e2.EmployeeID
JOIN Employees AS e3 ON e2.ReportsTo = e3.EmployeeID;
Output
+----------------+-----------------+-------------------+
° Name ° Manager ° Manager's Manager °
+----------------+-----------------+-------------------+
° Michael Suyama ° Steven Buchanan ° Andrew Fuller °
° Robert King ° Steven Buchanan ° Andrew Fuller °
° Anne Dodsworth ° Steven Buchanan ° Andrew Fuller °
+----------------+-----------------+-------------------+
Cypher
MATCH p = (:Employee)-[:REPORTS_TO*2]->(:Employee)
RETURN EXTRACT(n IN NODES(p) |
n.first_name + ' ' + n.last_name) AS reporting;
Output
+------------------------------------------------------+
| reporting |
+------------------------------------------------------+
| ["Michael Suyama","Steven Buchanan","Andrew Fuller"] |
| ["Robert King","Steven Buchanan","Andrew Fuller"] |
| ["Anne Dodsworth","Steven Buchanan","Andrew Fuller"] |
+------------------------------------------------------+
Build an App!
REST Drivers
REST Drivers
Java
.NET
JavaScript
Python
Ruby
PHP
Python App
Questions?

More Related Content

PDF
Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph ...
PDF
متن‌بازسازی کلان‌داده
PDF
بررسی کاربردها و چالش های کلان داده در تحلیل عقاید
PDF
تشخیص انجمن در مقیاس کلان داده
PDF
Big Data and Machine Learning Workshop - Day 3 @ UTACM
PDF
Two Case Studies Big-Data and Machine Learning at Scale Solutions in Iran
PPTX
GraphTalk Frankfurt - Master Data Management bei der Bayerischen Versicherung
Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph ...
متن‌بازسازی کلان‌داده
بررسی کاربردها و چالش های کلان داده در تحلیل عقاید
تشخیص انجمن در مقیاس کلان داده
Big Data and Machine Learning Workshop - Day 3 @ UTACM
Two Case Studies Big-Data and Machine Learning at Scale Solutions in Iran
GraphTalk Frankfurt - Master Data Management bei der Bayerischen Versicherung

Viewers also liked (20)

PDF
Transparency One : La (re)découverte de la chaîne d'approvisionnement
PDF
Graph Your Business - GraphDay JimWebber
PPTX
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
PDF
Graph all the things
PPTX
Neo4j Makes Graphs Easy
PDF
Metadata and Access Control
PDF
GraphConnect 2014 SF: Betting the Company on a Graph Database - Part 2
PDF
Graph your business
PDF
GraphConnect 2014 SF: The Business Graph
PDF
Graph Search and Discovery for your Dark Data
PDF
Neo4j Makes Graphs Easy? - GraphDay AmandaLaucher
PDF
GraphDay Noble/Coolio
PDF
Meetup Analytics with R and Neo4j
PPTX
Graphs fun vjug2
PPTX
GraphTalk Frankfurt - Einführung in Graphdatenbanken
PDF
GraphTalk - Semantische Netze mit structr
PPTX
Graph all the things - PRathle
PPTX
GraphTalks - Einführung
PPTX
GraphTalk - Semantisches PDM bei Schleich
PDF
RDBMS to Graphs
Transparency One : La (re)découverte de la chaîne d'approvisionnement
Graph Your Business - GraphDay JimWebber
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
Graph all the things
Neo4j Makes Graphs Easy
Metadata and Access Control
GraphConnect 2014 SF: Betting the Company on a Graph Database - Part 2
Graph your business
GraphConnect 2014 SF: The Business Graph
Graph Search and Discovery for your Dark Data
Neo4j Makes Graphs Easy? - GraphDay AmandaLaucher
GraphDay Noble/Coolio
Meetup Analytics with R and Neo4j
Graphs fun vjug2
GraphTalk Frankfurt - Einführung in Graphdatenbanken
GraphTalk - Semantische Netze mit structr
Graph all the things - PRathle
GraphTalks - Einführung
GraphTalk - Semantisches PDM bei Schleich
RDBMS to Graphs
Ad

Similar to Neo4j Makes Graphs Easy: Nicole White (20)

PDF
Windowing Functions - Little Rock Tech fest 2019
PDF
Windowing Functions - Little Rock Tech Fest 2019
PPTX
The Current State of Table API in 2022
PPTX
Oracle Database features every developer should know about
PPTX
MySQL 8.0 Released Update
PPT
Short Intro to PHP and MySQL
PDF
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
PPT
Database Development Replication Security Maintenance Report
PPTX
OpenWorld Sep14 12c for_developers
PDF
Oracle Diagnostics : Explain Plans (Simple)
PDF
PL/SQL TRIGGERS
PDF
Adding Complex Data to Spark Stack by Tug Grall
PDF
TechShift: There’s light beyond LAMP
PPTX
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
PPTX
5 Cool Things About SQL
PDF
Window functions
PDF
Intro to Cypher for the SQL Developer
PDF
Sangam 2019 - The Latest Features
PPTX
Dublin Ireland Spark Meetup October 15, 2015
PPTX
Mike lawell executionplansformeremortals_2015
Windowing Functions - Little Rock Tech fest 2019
Windowing Functions - Little Rock Tech Fest 2019
The Current State of Table API in 2022
Oracle Database features every developer should know about
MySQL 8.0 Released Update
Short Intro to PHP and MySQL
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
Database Development Replication Security Maintenance Report
OpenWorld Sep14 12c for_developers
Oracle Diagnostics : Explain Plans (Simple)
PL/SQL TRIGGERS
Adding Complex Data to Spark Stack by Tug Grall
TechShift: There’s light beyond LAMP
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
5 Cool Things About SQL
Window functions
Intro to Cypher for the SQL Developer
Sangam 2019 - The Latest Features
Dublin Ireland Spark Meetup October 15, 2015
Mike lawell executionplansformeremortals_2015
Ad

More from Neo4j (20)

PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
PDF
Jin Foo - Prospa GraphSummit Sydney Presentation.pdf
PDF
GraphSummit Singapore Master Deck - May 20, 2025
PPTX
Graphs & GraphRAG - Essential Ingredients for GenAI
PPTX
Neo4j Knowledge for Customer Experience.pptx
PPTX
GraphTalk New Zealand - The Art of The Possible.pptx
PDF
Neo4j: The Art of the Possible with Graph
PDF
Smarter Knowledge Graphs For Public Sector
PDF
GraphRAG and Knowledge Graphs Exploring AI's Future
PDF
Matinée GenAI & GraphRAG Paris - Décembre 24
PDF
ANZ Presentation: GraphSummit Melbourne 2024
PDF
Google Cloud Presentation GraphSummit Melbourne 2024: Building Generative AI ...
PDF
Telstra Presentation GraphSummit Melbourne: Optimising Business Outcomes with...
PDF
Hands-On GraphRAG Workshop: GraphSummit Melbourne 2024
PDF
Démonstration Digital Twin Building Wire Management
PDF
Swiss Life - Les graphes au service de la détection de fraude dans le domaine...
PDF
Démonstration Supply Chain - GraphTalk Paris
PDF
The Art of Possible - GraphTalk Paris Opening Session
PPTX
How Siemens bolstered supply chain resilience with graph-powered AI insights ...
PDF
Knowledge Graphs for AI-Ready Data and Enterprise Deployment - Gartner IT Sym...
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Jin Foo - Prospa GraphSummit Sydney Presentation.pdf
GraphSummit Singapore Master Deck - May 20, 2025
Graphs & GraphRAG - Essential Ingredients for GenAI
Neo4j Knowledge for Customer Experience.pptx
GraphTalk New Zealand - The Art of The Possible.pptx
Neo4j: The Art of the Possible with Graph
Smarter Knowledge Graphs For Public Sector
GraphRAG and Knowledge Graphs Exploring AI's Future
Matinée GenAI & GraphRAG Paris - Décembre 24
ANZ Presentation: GraphSummit Melbourne 2024
Google Cloud Presentation GraphSummit Melbourne 2024: Building Generative AI ...
Telstra Presentation GraphSummit Melbourne: Optimising Business Outcomes with...
Hands-On GraphRAG Workshop: GraphSummit Melbourne 2024
Démonstration Digital Twin Building Wire Management
Swiss Life - Les graphes au service de la détection de fraude dans le domaine...
Démonstration Supply Chain - GraphTalk Paris
The Art of Possible - GraphTalk Paris Opening Session
How Siemens bolstered supply chain resilience with graph-powered AI insights ...
Knowledge Graphs for AI-Ready Data and Enterprise Deployment - Gartner IT Sym...

Recently uploaded (20)

PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
history of c programming in notes for students .pptx
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Cost to Outsource Software Development in 2025
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Digital Systems & Binary Numbers (comprehensive )
Monitoring Stack: Grafana, Loki & Promtail
history of c programming in notes for students .pptx
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Cost to Outsource Software Development in 2025
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Design an Analysis of Algorithms II-SECS-1021-03
Salesforce Agentforce AI Implementation.pdf
iTop VPN Crack Latest Version Full Key 2025
Oracle Fusion HCM Cloud Demo for Beginners
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Nekopoi APK 2025 free lastest update
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Designing Intelligence for the Shop Floor.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency

Neo4j Makes Graphs Easy: Nicole White