Download - Webinar: RDBMS to Graphs
![Page 1: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/1.jpg)
RDBMS TO GRAPH
Live from San Mateo, March 9, 2017Webinar
![Page 2: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/2.jpg)
![Page 3: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/3.jpg)
![Page 4: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/4.jpg)
HR-tools Supply Payments Logistics CRM Support
TRADITIONAL DATA STRUCTURE
RDBMS RDBMS RDBMSRDBMS RDBMS RDBMS
![Page 5: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/5.jpg)
SHIFT TOWARDS SYSTEMS OF ENGAGEMENT
![Page 6: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/6.jpg)
Users Engaging With DevicesUsers Engaging With Users Devices Engaging With Devices
SYSTEMS OF ENGAGEMENT
![Page 7: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/7.jpg)
SHIFT TOWARDS SYSTEMS OF ENGAGEMENT
You are here!
Data volume
![Page 8: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/8.jpg)
SYSTEMS OF RECORDRelational Database Model
StructuredPre-computed
Based on rigid rules
SYSTEMS OF ENGAGEMENTNoSQL Database Model
Highly FlexibleReal-Time QueriesHighly Contextual
![Page 9: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/9.jpg)
SYSTEMS OF RECORD
![Page 10: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/10.jpg)
SYSTEMS OF ENGAGEMENT
This is data modeled as a graph!
![Page 11: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/11.jpg)
IntuitivnessSpeedAgility
![Page 12: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/12.jpg)
IntuitivenessSpeedAgility
![Page 13: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/13.jpg)
Intuitiveness
![Page 14: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/14.jpg)
IntuitivnessSpeedAgility
![Page 15: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/15.jpg)
Speed
“We found Neo4j to be literally thousands of times faster than our prior MySQL solution, with queries that require
10-100 times less code. Today, Neo4j provides eBay with functionality that was previously impossible.”
- Volker Pacher, Senior Developer
“Minutes to milliseconds” performance Queries up to 1000x faster than RDBMS or other NoSQL
![Page 16: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/16.jpg)
IntuitivnessSpeed, because Native Graph Database
Agility
![Page 17: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/17.jpg)
WHAT DOES “NATIVE” MEAN?
![Page 18: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/18.jpg)
Employee ID Name PictureRef Building Office Departme
nt Title Degree1 Uni1 Major1
4951870 John Doe
s3://acme-pics/
4951870.png
1200 124A Eng Software Engineer II MS Harvard Computer
Science
9765207 Jane Smith
s3://acme-pics/
9765207.png
1300 187D BizOpsSr
Operations Associate
BS Stanford Physics
4150915 Shyam Bhatt
s3://acme-pics/
4150915.png
45 432C SalesEnterprise
Sales Assoc
MBA Penn Accounting
7566243 Kathryn Bates
s3://acme-pics/
7566243.png
44 334B EngStaff
Software Engineer
PhD UCB Computer Science
![Page 19: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/19.jpg)
![Page 20: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/20.jpg)
![Page 21: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/21.jpg)
WHY DOES “NATIVE” MATTER?
![Page 22: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/22.jpg)
Think of a Relational DB QueryEmpID Name PictureRef
4951870 John Doe s3://acme-pics/4951870.png
9765207 Jane Smith s3://acme-pics/9765207.png
4150915 Shyam Bhatt s3://acme-pics/4150915.png
7566243 Kathryn Bates s3://acme-pics/7566243.png
EmpID Manager ID StartDate EndDate
4951870 9765207 20170101 null
9765207 7566243 20150130 null
4150915 8795882 20141215 20150312
7566243 8509238 20120605 20140124
EmpID Building Office
4951870 1200 124A
9765207 1300 187D
4150915 45 432C
![Page 23: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/23.jpg)
Think of a Relational DB QueryEmpID Name PictureRef
4951870 John Doe s3://acme-pics/4951870.png
9765207 Jane Smith s3://acme-pics/9765207.png
4150915 Shyam Bhatt s3://acme-pics/4150915.png
7566243 Kathryn Bates s3://acme-pics/7566243.png
EmpID Manager ID StartDate EndDate
4951870 9765207 20170101 null
9765207 7566243 20150130 null
4150915 8795882 20141215 20150312
7566243 8509238 20120605 20140124
EmpID Building Office
4951870 1200 124A
9765207 1300 187D
4150915 45 432C
![Page 24: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/24.jpg)
Think of a Relational DB QueryEmpID Name PictureRef
4951870 John Doe s3://acme-pics/4951870.png
9765207 Jane Smith s3://acme-pics/9765207.png
4150915 Shyam Bhatt s3://acme-pics/4150915.png
7566243 Kathryn Bates s3://acme-pics/7566243.png
EmpID Manager ID StartDate EndDate
4951870 9765207 20170101 null
9765207 7566243 20150130 null
4150915 8795882 20141215 20150312
7566243 8509238 20120605 20140124
EmpID Building Office
4951870 1200 124A
9765207 1300 187D
4150915 45 432C
16+ Index LookupsExpensive!
![Page 25: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/25.jpg)
(Partial) Graph View
1 Index Lookup (find :Employee nodes)
Then Index-Free Adjacency
:Employee{id:4951870}
:Employee{id:9765207}
:Office{id: 1200124a}
:Building{id: 1200}
[:IS_MANAGED_BY]
[:HAS_OFFICE]
[:LOCATED_IN]
![Page 26: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/26.jpg)
IntuitivnessSpeedAgility
![Page 27: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/27.jpg)
A Naturally Adaptive Model
A Query Language Designed for Connectedness
+
=Agility
![Page 28: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/28.jpg)
CypherTypical Complex SQL Join The Same Query using Cypher
MATCH (boss)-[:MANAGES*0..3]->(sub), (sub)-[:MANAGES*1..3]->(report)WHERE boss.name = “John Doe”RETURN sub.name AS Subordinate, count(report) AS Total
Project ImpactLess time writing queries
Less time debugging queries
Code that’s easier to read
![Page 29: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/29.jpg)
ABOUT ME• Developed web apps for 5 years
including e-commerce, business workflow, more.
• Worked at Google for 8 years on Google Apps, Cloud Platform
• Technologies: Python, Java, BigQuery, Oracle, MySQL, OAuth
[email protected] @ryguyrg
![Page 30: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/30.jpg)
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 31: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/31.jpg)
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
GRAPH THINKING: Real Time Recommendations
VIEW
ED
VIEWED
BOUG
HT
VIEWED BOUGHT
BOUGHT
BO
UG
HT
BOUG
HT
![Page 32: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/32.jpg)
“As the current market leader in graph databases, and with enterprise features for scalability and availability, Neo4j is the right choice to meet our demands.” Marcos Wada
Software Developer, Walmart
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 33: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/33.jpg)
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
GRAPH THINKING: Master Data Management
MANAGES
MANAGES
LEADS
REGION
MANAGES
MANAGES
REGION
LEADS
LEADS
COLL
ABO
RATE
S
![Page 34: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/34.jpg)
Neo4j is the heart of Cisco HMP: used for governance and single source of truth and a one-stop shop for all of Cisco’s hierarchies.
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 35: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/35.jpg)
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
GRAPH THINKING: Master Data Management
Solu%onSupportCase
SupportCase
KnowledgeBaseAr%cle
Message
KnowledgeBaseAr%cle
KnowledgeBaseAr%cle
Neo4j is the heart of Cisco’s Helpdesk Solution too.
![Page 36: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/36.jpg)
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
GRAPH THINKING: Fraud Detection
OPENED_ACCOUNT
HAS IS_ISSUED
HAS
LIVES LIVES
IS_ISSUED
OPE
NED_
ACCO
UNT
![Page 37: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/37.jpg)
“Graph databases offer new methods of uncovering fraud rings and other sophisticated scams with a high-level of accuracy, and are capable of stopping advanced fraud scenarios in real-time.”
Gorka SadowskiCyber Security Expert
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 38: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/38.jpg)
GRAPH THINKING: Graph Based Search
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
PUBLISH
INCLUDE
INCLUDE
CREATE
CAPT
URE
IN
INSO
URCE
USES
USES
IN
IN
USES
SOURCE SOURCE
![Page 39: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/39.jpg)
Uses Neo4j to manage the digital assets inside of its next generation in-flight entertainment system.
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 40: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/40.jpg)
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
BROWSESCO
NNEC
TS
BRIDGES
ROUTES
POW
ERSROUTES
POWERSPOWERS
HOSTS
QUERIES
GRAPH THINKING: Network & IT-Operations
![Page 41: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/41.jpg)
Uses Neo4j for network topology analysis for big telco service providers
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 42: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/42.jpg)
GRAPH THINKING: Identity And Access Management
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
TRUSTS
TRUSTS
ID
ID
AUTHENTICATES
AUTH
ENTI
CATE
S
OWNS
OWNSC
AN
_REA
D
![Page 43: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/43.jpg)
UBS was the recipient of the 2014 Graphie Award for “Best Identify And Access Management App”
NEO4j USE CASESReal Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
![Page 44: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/44.jpg)
Neo4j Adoption by Selected VerticalsSOFTWARE FINANCIAL
SERVICES RETAIL MEDIA & BROADCASTING
SOCIAL NETWORKS TELECOM HEALTHCARE
![Page 45: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/45.jpg)
AGENDA• Use Cases • SQL Pains • Building a Neo4j Application • Moving from RDBMS -> Graph Models
• Walk through an Example • Creating Data in Graphs • Querying Data
![Page 46: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/46.jpg)
![Page 47: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/47.jpg)
SQL
Day in the Life of a RDBMS Developer
![Page 48: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/48.jpg)
![Page 49: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/49.jpg)
![Page 50: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/50.jpg)
![Page 51: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/51.jpg)
![Page 52: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/52.jpg)
![Page 53: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/53.jpg)
![Page 54: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/54.jpg)
![Page 55: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/55.jpg)
SELECT p.name, c.country, c.leader, p.hair, u.name, u.pres, u.stateFROM people p LEFT JOIN country c ON c.ID=p.country LEFT JOIN uni u ON p.uni=u.idWHERE u.state=‘CT’
![Page 56: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/56.jpg)
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
![Page 57: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/57.jpg)
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
![Page 58: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/58.jpg)
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
JOIN
![Page 59: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/59.jpg)
![Page 60: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/60.jpg)
![Page 61: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/61.jpg)
• Complex to model and store relationships • Performance degrades with increases in data • Queries get long and complex • Maintenance is painful
SQL Pains
![Page 62: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/62.jpg)
• Easy to model and store relationships • Performance of relationship traversal remains constant with
growth in data size • Queries are shortened and more readable • Adding additional properties and relationships can be done on
the fly - no migrations
Graph Gains
![Page 63: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/63.jpg)
![Page 64: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/64.jpg)
What does this Graph look like?
![Page 65: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/65.jpg)
CYPHER
Ann DanLoves
![Page 66: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/66.jpg)
Property Graph Model
CREATE (:Person { name:“Dan”} ) - [:LOVES]-> (:Person { name:“Ann”} )
LOVES
LABEL PROPERTY
NODE NODE
LABEL PROPERTY
![Page 67: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/67.jpg)
![Page 68: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/68.jpg)
MATCH (p:Person)-[:WENT_TO]->(u:Uni), (p)-[:LIVES_IN]->(c:Country), (u)-[:LED_BY]->(l:Leader), (u)-[:LOCATED_IN]->(s:State)WHERE s.abbr = ‘CT’RETURN p.name, c.country, c.leader, p.hair, u.name, l.name, s.abbr
![Page 69: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/69.jpg)
![Page 70: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/70.jpg)
![Page 71: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/71.jpg)
How do you use Neo4j?
CREATE MODEL
+
LOAD DATA QUERY DATA
![Page 72: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/72.jpg)
How do you use Neo4j?
![Page 73: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/73.jpg)
![Page 74: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/74.jpg)
How do you use Neo4j?
![Page 75: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/75.jpg)
Official Language Drivers
![Page 76: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/76.jpg)
Community Language Drivers
![Page 77: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/77.jpg)
Java Stored Procedures and Functions
![Page 78: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/78.jpg)
GET STARTED TODAY!!!
![Page 80: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/80.jpg)
![Page 81: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/81.jpg)
Architectural Options
DataStorageandBusinessRulesExecu5on
DataMiningandAggrega5on
Applica'on
GraphDatabaseCluster
Neo4j Neo4j Neo4j
AdHocAnalysis
BulkAnaly'cInfrastructureHadoop,EDW…
DataScien'st
EndUser
DatabasesRela5onalNoSQLHadoop
![Page 82: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/82.jpg)
RDBMS to Graph Options
MIGRATEALLDATA
MIGRATESUBSET
DUPLICATESUBSET
Non-GraphQueries GraphQueries
GraphQueriesNon-GraphQueries
AllQueries
Rela3onalDatabase
GraphDatabase
Application
Application
Application
NonGraphData
AllData
![Page 83: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/83.jpg)
FROM RDBMS TO GRAPHS
![Page 84: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/84.jpg)
![Page 85: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/85.jpg)
![Page 86: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/86.jpg)
Northwind
![Page 87: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/87.jpg)
Northwind - the canonical RDBMS Example
![Page 88: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/88.jpg)
( )-[:TO]->(Graph)
![Page 89: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/89.jpg)
![Page 90: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/90.jpg)
( )-[:IS_BETTER_AS]->(Graph)
![Page 91: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/91.jpg)
Starting with the ER Diagram
![Page 92: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/92.jpg)
Locate the Foreign Keys
![Page 93: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/93.jpg)
Drop the Foreign Keys
![Page 94: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/94.jpg)
Find the JOIN Tables
![Page 95: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/95.jpg)
(Simple) JOIN Tables Become Relationships
![Page 96: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/96.jpg)
Attributed JOIN Tables -> Relationships with Properties
![Page 97: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/97.jpg)
Querying a Subset Today
![Page 98: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/98.jpg)
As a Graph
![Page 99: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/99.jpg)
QUERYING THE GRAPH
![Page 100: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/100.jpg)
using openCypher
![Page 101: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/101.jpg)
Property Graph Model
CREATE(:Employee{firstName:“Steven”})-[:REPORTS_TO]->(:Employee{firstName:“Andrew”})
REPORTS_TO Steven Andrew
LABEL PROPERTY
NODE NODE
LABEL PROPERTY
![Page 102: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/102.jpg)
Who do people report to?MATCH (e:Employee)<-[:REPORTS_TO]-(sub:Employee)RETURN *
![Page 103: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/103.jpg)
Who do people report to?
![Page 104: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/104.jpg)
Who do people report to?MATCH (e:Employee)<-[:REPORTS_TO]-(sub:Employee)RETURN e.employeeID AS managerID, e.firstName AS managerName, sub.employeeID AS employeeID, sub.firstName AS employeeName;
![Page 105: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/105.jpg)
Who do people report to?
![Page 106: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/106.jpg)
Who does Robert report to?
MATCH p=(e:Employee)<-[:REPORTS_TO]-(sub:Employee)WHERE sub.firstName = ‘Robert’RETURN p
![Page 107: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/107.jpg)
Who does Robert report to?
![Page 108: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/108.jpg)
What is Robert’s reporting chain?
MATCH p=(e:Employee)<-[:REPORTS_TO*]-(sub:Employee)WHERE sub.firstName = ‘Robert’RETURN p
![Page 109: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/109.jpg)
What is Robert’s reporting chain?
![Page 110: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/110.jpg)
Who’s the Big Boss?MATCH (e:Employee)WHERE NOT (e)-[:REPORTS_TO]->()RETURN e.firstName as bigBoss
![Page 111: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/111.jpg)
Who’s the Big Boss?
![Page 112: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/112.jpg)
Product Cross-SellingMATCH (choc:Product {productName: 'Chocolade'}) <-[:INCLUDES]-(:Order)<-[:SOLD]-(employee), (employee)-[:SOLD]->(o2)-[:INCLUDES]->(other:Product)RETURN employee.firstName, other.productName, COUNT(DISTINCT o2) as countORDER BY count DESCLIMIT 5;
![Page 113: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/113.jpg)
Product Cross-Selling
![Page 114: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/114.jpg)
(ASIDE ON GRAPH COMPUTE)
![Page 115: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/115.jpg)
Shortest Path Between AirportsMATCH p = shortestPath( (a:Airport {code:”SFO”})-[*0..2]-> (b:Airport {code: “MSO”}))RETURN p
![Page 116: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/116.jpg)
(END ASIDE ON GRAPH COMPUTE)
![Page 117: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/117.jpg)
POWERING AN APP
![Page 118: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/118.jpg)
Simple App
![Page 119: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/119.jpg)
Simple App
![Page 120: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/120.jpg)
Simple Python Code
![Page 121: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/121.jpg)
Simple Python Code
![Page 122: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/122.jpg)
Simple Python Code
![Page 123: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/123.jpg)
Simple Python Code
![Page 124: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/124.jpg)
LOADING OUR DATA
![Page 125: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/125.jpg)
CSV
![Page 126: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/126.jpg)
CSV files for Northwind
![Page 127: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/127.jpg)
CSV files for Northwind
![Page 128: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/128.jpg)
3 Steps to Creating the Graph
IMPORT NODES CREATE INDEXES IMPORT RELATIONSHIPS
![Page 129: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/129.jpg)
Importing Nodes// Create customersUSING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/customers.csv" AS rowCREATE (:Customer {companyName: row.CompanyName, customerID: row.CustomerID, fax: row.Fax, phone: row.Phone});
// Create productsUSING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/products.csv" AS rowCREATE (:Product {productName: row.ProductName, productID: row.ProductID, unitPrice: toFloat(row.UnitPrice)});
![Page 130: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/130.jpg)
Importing Nodes// Create suppliersUSING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/suppliers.csv" AS rowCREATE (:Supplier {companyName: row.CompanyName, supplierID: row.SupplierID});
// Create employeesUSING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/employees.csv" AS rowCREATE (:Employee {employeeID:row.EmployeeID, firstName: row.FirstName, lastName: row.LastName, title: row.Title});
![Page 131: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/131.jpg)
Creating RelationshipsUSING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/orders.csv" AS rowMATCH (order:Order {orderID: row.OrderID})MATCH (customer:Customer {customerID: row.CustomerID})MERGE (customer)-[:PURCHASED]->(order);
USING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/products.csv" AS rowMATCH (product:Product {productID: row.ProductID})MATCH (supplier:Supplier {supplierID: row.SupplierID})MERGE (supplier)-[:SUPPLIES]->(product);
![Page 132: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/132.jpg)
Creating RelationshipsUSING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/orders.csv" AS rowMATCH (order:Order {orderID: row.OrderID})MATCH (product:Product {productID: row.ProductID})MERGE (order)-[pu:INCLUDES]->(product)ON CREATE SET pu.unitPrice = toFloat(row.UnitPrice), pu.quantity = toFloat(row.Quantity);
USING PERIODIC COMMITLOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/neo4j-contrib/developer-resources/gh-pages/data/northwind/orders.csv" AS rowMATCH (order:Order {orderID: row.OrderID})MATCH (employee:Employee {employeeID: row.EmployeeID})MERGE (employee)-[:SOLD]->(order);
![Page 133: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/133.jpg)
High Performance LOADingneo4j-import
4.58 million thingsand their relationships…
Loads in 100 seconds!
![Page 134: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/134.jpg)
JDBCapoc.load.jdbc
![Page 135: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/135.jpg)
THERE’S A PROCEDURE FOR THAT
https://github.com/neo4j-contrib/neo4j-apoc-procedures
![Page 136: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/136.jpg)
![Page 137: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/137.jpg)
![Page 138: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/138.jpg)
![Page 139: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/139.jpg)
WRAPPING UP
![Page 140: Webinar: RDBMS to Graphs](https://reader030.vdocument.in/reader030/viewer/2022011722/58d139241a28ab455d8b4735/html5/thumbnails/140.jpg)
“We found Neo4j to be literally thousands of times faster than our prior MySQL solution, with queries that require 10 to 100 times less code. Today, Neo4j provides eBay with functionality that was previously impossible.”
Volker PacherSenior Developer