RDBMS to GraphsHarnessing the Power of the Graph
March 2015
Agenda
• Origins of Neo4j
• Benefits of Graphs
• Your enterprise architecture & polyglot persistence
• Query time!
• Q&A
Neo Technology Overview
Product
• Neo4j - World’s leading graph database
• 1M+ downloads, adding 50k+ per month
• 150+ enterprise subscription customers including over 50 of the Global 2000
Company
• Neo Technology, Creator of Neo4j
• 80 employees with HQ in Silicon Valley, London, Munich, Paris and Malmö
• $45M in funding from Fidelity, Sunstone, Conor, Creandum, Dawn Capital
Neo4j Adoption by Selected Verticals
FinancialServices
CommunicationsHealth &
Life Sciences
HR &Recruiting
Media &Publishing
SocialWeb
Industry & Logistics
Entertainment Consumer Retail Information ServicesBusiness Services
How Customers Use Neo4j
Network & Data Center
Master DataManagement
SocialRecom–
mendations
Identity & Access
Search &Discovery
GEO
“Forrester estimates that over 25% of enterprises will be using graph databases by 2017”
Neo4j Leads the Graph Database Revolution
“Neo4j is the current market leader in graph databases.”
“Graph analysis is possibly the single most effective competitive differentiator for organizations pursuing data-driven operations and decisions after the design of data capture.”
IT Market Clock for Database Management Systems, 2014https://www.gartner.com/doc/2852717/it-market-clock-database-management
TechRadar™: Enterprise DBMS, Q1 2014http://www.forrester.com/TechRadar+Enterprise+DBMS+Q1+2014/fulltext/-/E-RES106801
Graph Databases – and Their Potential to Transform How We Capture Interdependencies (Enterprise Management Associates)http://blogs.enterprisemanagement.com/dennisdrogseth/2013/11/06/graph-databasesand-potential-transform-capture-interdependencies/
Largest Ecosystem of Graph Enthusiasts
• 1,000,000+ downloads
• 20,000+ education registrants
• 18,000+ Meetup members
• 100+ technology and service partners
• 150+ enterprise subscription customers including 50+ Global 2000 companies
High Business Value in Data Relationships
Data is increasing in volume…• New digital processes• More online transactions• New social networks• More devices
Using Data Relationships unlocks value • Real-time recommendations• Fraud detection• Master data management• Network and IT operations• Identity and access management• Graph-based search… and is getting more connected
Customers, products, processes, devices interact and relate to each other
Early adopters became industry leaders
Relational DBs Can’t Handle Relationships Well
• Cannot model or store data and relationships without complexity
• Performance degrades with number and levels of relationships, and database size
• Query complexity grows with need for JOINs
• Adding new types of data and relationships requires schema redesign, increasing time to market
… making traditional databases inappropriatewhen data relationships are valuable in real-time
Slow developmentPoor performance
Low scalabilityHard to maintain
Unlocking Value from Your Data Relationships
• Model your data as a graph of data and relationships
• Use relationship information in real-time to transform your business
• Add new relationships on the fly to adapt to your changing business
Modeling as a Graph
The Whiteboard Model Is the Physical Model
CAR
name: “Dan”born: May 29, 1970
twitter: “@dan”name: “Ann”
born: Dec 5, 1975
since: Jan 10, 2011
brand: “Volvo”model: “V70”
Property Graph Model Components
Nodes• The objects in the graph• Can have name-value properties• Can be labeled
Relationships• Relate nodes by type and direction• Can have name-value properties
LOVES
LOVES
LIVES WITHPERSON PERSON
Relational Versus Graph Models
Relational Model Graph Model
KNOWSANDREAS
TOBIAS
MICA
DELIA
Person FriendPerson-Friend
ANDREASDELIA
TOBIAS
MICA
Let’s Model!Customer, Supplier, and Product (Master Data)
Orders (Activity)
The Domain Model
Except…
The RequisiteNorthwind Example!
NOT JUST ANY
(Northwind)-[:TO]->(Graph)Building the Graph Model
Building Relationships in Graphs
SOLD
Employee OrderOrder
Locate Foreign Keys
(FKs)-[:BECOME]->(Relationships)Correct Directions
Drop Foreign Keys
Find the Join Tables
Simple Join Tables Becomes Relationships
Attributed Join Tables BecomeRelationships with Properties
Working Subset (Today’s Exercise)
Northwind Graph Model
Querying Your Data
Basic Query: Who do people report to?
MATCH (:Employee{ firstName:“Steven”} ) -[:REPORTS_TO]-> (:Employee{ firstName:“Andrew”} )
REPORTS_TO
Steven Andrew
LABEL PROPERTY
NODE NODE
LABEL PROPERTY
Basic Query: Who do people report to?
MATCH
(e:Employee)<-[:REPORTS_TO]-(sub:Employee)
RETURN
*
Basic Query: Who do people report to?
Basic Query: Who do people report to?
MATCH (sub)-[:REPORTS_TO*0..3]->(boss),(report)-[:REPORTS_TO*1..3]->(sub)
WHERE boss.name = “John Doe”RETURN sub.name AS Subordinate, count(report) AS Total
Express Complex Queries Easily with Cypher
Find all direct reports and how many people they manage, up to 3 levels down
Cypher Query
SQL Query
“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
Who is in Robert’s (direct, upwards) reporting chain?
MATCH
p=(e:Employee)<-[:REPORTS_TO*]-(sub:Employee)
WHERE
sub.firstName = ‘Robert’
RETURN
p
Who is in Robert’s (direct, upwards) reporting chain?
Who’s the Big Boss?
MATCH
p=(e:Employee)
WHERE
NOT (e)<-[:REPORTS_TO]->()
RETURN
e.firstName as bigBoss
Who’s the Big Boss?
Product Cross-Sell
MATCH
(choc:Product {productName: 'Chocolade'})
<-[:PRODUCT]-(:Order)<-[:SOLD]-(employee),
(employee)-[:SOLD]->(o2)-[:PRODUCT]->(other:Product)
RETURN
employee.firstName, other.productName, count(distinct o2) as count
ORDER BY
count DESC
LIMIT 5;
Product Cross-Sell
High Performance
Neo4j Clustering Architecture Optimized for Speed & Availability at Scale
43
Performance Benefits
• No network hops within queries
• Real-time operations with fast and consistent response times
• Cache sharding spreads cache across cluster for very large graphs
Clustering Features• Master-slave replication with
master re-election and failover• Each instance has its own local cache• Horizontal scaling & disaster recovery
Load Balancer
Neo4jNeo4jNeo4j
Getting Data into Neo4j
Cypher-Based “LOAD CSV” Capability• Transactional (ACID) writes• Initial and incremental loads of up to
10 million nodes and relationships
Command-Line Bulk Loader neo4j-import• For initial database population• For loads with 10B+ records• Up to 1M records per second
4.58 million thingsand their relationships…
Loads in 100 seconds!
MIGRATE ALL DATA
MIGRATE GRAPH DATA
DUPLICATE GRAPH DATA
Non-graph data Graph data
Graph dataAll data
All data
RelationalDatabase
GraphDatabase
Application
Application
Application
Three Ways to Load Data into Neo4j
Polyglot Persistence
Data Storage andBusiness Rules Execution
Data Mining and Aggregation
Neo4j Fits into Your Enterprise Environment
Application
Graph Database Cluster
Neo4j Neo4j Neo4j
Ad HocAnalysis
Bulk AnalyticInfrastructure
Graph Compute EngineEDW …
Data Scientist
End User
Databases
RelationalNoSQL
Hadoop
Polyglot Persistence
Users Love Neo4j
Users Love Neo4j
Learn the Way of the GraphQuickly and Easily
Quick Start: Plan Your Project
1
2
3
4
5
6
7
8
Learn Neo4j
Decide on Architecture
Import and Model Data
Build Application
Test Application
Deploy your appin as little as 8 weeks
PROFESSIONAL SERVICES PLAN
There Are Lots of Ways to Easily Learn Neo4j
SummaryOnly Neo4j Unlocks the Value in Your Data Relationships
Data is increasing in volume…• New digital processes• More online transactions• New social networks• More devices
… and is getting more connected
Customers, products, processes, devices interact and relate to each other
RDBMS to GraphsHarnessing the Power of the Graph
End of Presentation
Top Related