Webinar: RDBMS to Graphs

141
RDBMS TO GRAPH Live from San Mateo, March 9, 2017 Webinar

Transcript of Webinar: RDBMS to Graphs

Page 1: Webinar: RDBMS to Graphs

RDBMS TO GRAPH

Live from San Mateo, March 9, 2017Webinar

Page 2: Webinar: RDBMS to Graphs
Page 3: Webinar: RDBMS to Graphs
Page 4: Webinar: RDBMS to Graphs

HR-tools Supply Payments Logistics CRM Support

TRADITIONAL DATA STRUCTURE

RDBMS RDBMS RDBMSRDBMS RDBMS RDBMS

Page 5: Webinar: RDBMS to Graphs

SHIFT TOWARDS SYSTEMS OF ENGAGEMENT

Page 6: Webinar: RDBMS to Graphs

Users Engaging With DevicesUsers Engaging With Users Devices Engaging With Devices

SYSTEMS OF ENGAGEMENT

Page 7: Webinar: RDBMS to Graphs

SHIFT TOWARDS SYSTEMS OF ENGAGEMENT

You are here!

Data volume

Page 8: Webinar: RDBMS to Graphs

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

SYSTEMS OF RECORD

Page 10: Webinar: RDBMS to Graphs

SYSTEMS OF ENGAGEMENT

This is data modeled as a graph!

Page 11: Webinar: RDBMS to Graphs

IntuitivnessSpeedAgility

Page 12: Webinar: RDBMS to Graphs

IntuitivenessSpeedAgility

Page 13: Webinar: RDBMS to Graphs

Intuitiveness

Page 14: Webinar: RDBMS to Graphs

IntuitivnessSpeedAgility

Page 15: Webinar: RDBMS to Graphs

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

IntuitivnessSpeed, because Native Graph Database

Agility

Page 17: Webinar: RDBMS to Graphs

WHAT DOES “NATIVE” MEAN?

Page 18: Webinar: RDBMS to Graphs

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
Page 20: Webinar: RDBMS to Graphs
Page 21: Webinar: RDBMS to Graphs

WHY DOES “NATIVE” MATTER?

Page 22: Webinar: RDBMS to Graphs

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

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

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

(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

IntuitivnessSpeedAgility

Page 27: Webinar: RDBMS to Graphs

A Naturally Adaptive Model

A Query Language Designed for Connectedness

+

=Agility

Page 28: Webinar: RDBMS to Graphs

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

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

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

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

“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

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

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

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

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

“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

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

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

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

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

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

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

Neo4j Adoption by Selected VerticalsSOFTWARE FINANCIAL

SERVICES RETAIL MEDIA & BROADCASTING

SOCIAL NETWORKS TELECOM HEALTHCARE

Page 45: Webinar: RDBMS to Graphs

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
Page 47: Webinar: RDBMS to Graphs

SQL

Day in the Life of a RDBMS Developer

Page 48: Webinar: RDBMS to Graphs
Page 49: Webinar: RDBMS to Graphs
Page 50: Webinar: RDBMS to Graphs
Page 51: Webinar: RDBMS to Graphs
Page 52: Webinar: RDBMS to Graphs
Page 53: Webinar: RDBMS to Graphs
Page 54: Webinar: RDBMS to Graphs
Page 55: Webinar: RDBMS to Graphs

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

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

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

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
Page 60: Webinar: RDBMS to Graphs
Page 61: Webinar: RDBMS to Graphs

• 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

• 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
Page 64: Webinar: RDBMS to Graphs

What does this Graph look like?

Page 65: Webinar: RDBMS to Graphs

CYPHER

Ann DanLoves

Page 66: Webinar: RDBMS to Graphs

Property Graph Model

CREATE (:Person { name:“Dan”} ) - [:LOVES]-> (:Person { name:“Ann”} )

LOVES

LABEL PROPERTY

NODE NODE

LABEL PROPERTY

Page 67: Webinar: RDBMS to Graphs
Page 68: Webinar: RDBMS to Graphs

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
Page 70: Webinar: RDBMS to Graphs
Page 71: Webinar: RDBMS to Graphs

How do you use Neo4j?

CREATE MODEL

+

LOAD DATA QUERY DATA

Page 72: Webinar: RDBMS to Graphs

How do you use Neo4j?

Page 73: Webinar: RDBMS to Graphs
Page 74: Webinar: RDBMS to Graphs

How do you use Neo4j?

Page 75: Webinar: RDBMS to Graphs

Official Language Drivers

Page 76: Webinar: RDBMS to Graphs

Community Language Drivers

Page 77: Webinar: RDBMS to Graphs

Java Stored Procedures and Functions

Page 78: Webinar: RDBMS to Graphs

GET STARTED TODAY!!!

Page 79: Webinar: RDBMS to Graphs

GET STARTED TODAY!!!

https://neo4j.com/sandbox-v2

Page 80: Webinar: RDBMS to Graphs
Page 81: Webinar: RDBMS to Graphs

Architectural Options

DataStorageandBusinessRulesExecu5on

DataMiningandAggrega5on

Applica'on

GraphDatabaseCluster

Neo4j Neo4j Neo4j

AdHocAnalysis

BulkAnaly'cInfrastructureHadoop,EDW…

DataScien'st

EndUser

DatabasesRela5onalNoSQLHadoop

Page 82: Webinar: RDBMS to Graphs

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

FROM RDBMS TO GRAPHS

Page 84: Webinar: RDBMS to Graphs
Page 85: Webinar: RDBMS to Graphs
Page 86: Webinar: RDBMS to Graphs

Northwind

Page 87: Webinar: RDBMS to Graphs

Northwind - the canonical RDBMS Example

Page 88: Webinar: RDBMS to Graphs

( )-[:TO]->(Graph)

Page 89: Webinar: RDBMS to Graphs
Page 90: Webinar: RDBMS to Graphs

( )-[:IS_BETTER_AS]->(Graph)

Page 91: Webinar: RDBMS to Graphs

Starting with the ER Diagram

Page 92: Webinar: RDBMS to Graphs

Locate the Foreign Keys

Page 93: Webinar: RDBMS to Graphs

Drop the Foreign Keys

Page 94: Webinar: RDBMS to Graphs

Find the JOIN Tables

Page 95: Webinar: RDBMS to Graphs

(Simple) JOIN Tables Become Relationships

Page 96: Webinar: RDBMS to Graphs

Attributed JOIN Tables -> Relationships with Properties

Page 97: Webinar: RDBMS to Graphs

Querying a Subset Today

Page 98: Webinar: RDBMS to Graphs

As a Graph

Page 99: Webinar: RDBMS to Graphs

QUERYING THE GRAPH

Page 100: Webinar: RDBMS to Graphs

using openCypher

Page 101: Webinar: RDBMS to Graphs

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

Who do people report to?MATCH (e:Employee)<-[:REPORTS_TO]-(sub:Employee)RETURN *

Page 103: Webinar: RDBMS to Graphs

Who do people report to?

Page 104: Webinar: RDBMS to Graphs

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

Who do people report to?

Page 106: Webinar: RDBMS to Graphs

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

Who does Robert report to?

Page 108: Webinar: RDBMS to Graphs

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

What is Robert’s reporting chain?

Page 110: Webinar: RDBMS to Graphs

Who’s the Big Boss?MATCH (e:Employee)WHERE NOT (e)-[:REPORTS_TO]->()RETURN e.firstName as bigBoss

Page 111: Webinar: RDBMS to Graphs

Who’s the Big Boss?

Page 112: Webinar: RDBMS to Graphs

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

Product Cross-Selling

Page 114: Webinar: RDBMS to Graphs

(ASIDE ON GRAPH COMPUTE)

Page 115: Webinar: RDBMS to Graphs

Shortest Path Between AirportsMATCH p = shortestPath( (a:Airport {code:”SFO”})-[*0..2]-> (b:Airport {code: “MSO”}))RETURN p

Page 116: Webinar: RDBMS to Graphs

(END ASIDE ON GRAPH COMPUTE)

Page 117: Webinar: RDBMS to Graphs

POWERING AN APP

Page 118: Webinar: RDBMS to Graphs

Simple App

Page 119: Webinar: RDBMS to Graphs

Simple App

Page 120: Webinar: RDBMS to Graphs

Simple Python Code

Page 121: Webinar: RDBMS to Graphs

Simple Python Code

Page 122: Webinar: RDBMS to Graphs

Simple Python Code

Page 123: Webinar: RDBMS to Graphs

Simple Python Code

Page 124: Webinar: RDBMS to Graphs

LOADING OUR DATA

Page 125: Webinar: RDBMS to Graphs

CSV

Page 126: Webinar: RDBMS to Graphs

CSV files for Northwind

Page 127: Webinar: RDBMS to Graphs

CSV files for Northwind

Page 128: Webinar: RDBMS to Graphs

3 Steps to Creating the Graph

IMPORT NODES CREATE INDEXES IMPORT RELATIONSHIPS

Page 129: Webinar: RDBMS to Graphs

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

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

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

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

High Performance LOADingneo4j-import

4.58 million thingsand their relationships…

Loads in 100 seconds!

Page 134: Webinar: RDBMS to Graphs

JDBCapoc.load.jdbc

Page 135: Webinar: RDBMS to Graphs

THERE’S A PROCEDURE FOR THAT

https://github.com/neo4j-contrib/neo4j-apoc-procedures

Page 136: Webinar: RDBMS to Graphs
Page 137: Webinar: RDBMS to Graphs
Page 138: Webinar: RDBMS to Graphs
Page 139: Webinar: RDBMS to Graphs

WRAPPING UP

Page 140: Webinar: RDBMS to Graphs

“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

Page 141: Webinar: RDBMS to Graphs

THANK YOU!

Ryan Boyd @ryguyrg [email protected]