These webinar slides are an introduction to Neo4j and Graph Databases. They discuss the primary use cases for Graph Databases and the properties of Neo4j which make those use cases possible. They also cover the high-level steps of modeling, importing, and querying your data using Cypher and touch on RDBMS to Graph.
Boost Fertility New Invention Ups Success Rates.pdf
Intro to Neo4j and Graph Databases
1. Intro to Neo4j and
Graph Databases
Neo4j Webinar March 2016
2. ABOUT ME
• William Lyon
• Developer Relations Engineer @neo4j
• http://neo4j.com/developer
will@neo4j.com
@lyonwj
3. Agenda
• What is a graph [database]?
• Use cases - why graphs?
• Neo4j product overview
• Labeled property graph data model
• Cypher query language
• RDBMS to graph
• Resources
• Questions?
12. Use of Graphs has created some of the most successful companies in the world
C
34,3%B
38,4%A
3,3%
D
3,8%
1,8%
1,8%
1,8%
1,8%
1,8%
E
8,1%
F
3,9%
13. Finance Social networks RetailHR &
Recruiting
Manufacturing
& Logistics
Health Care Telco
Today we see graph-projects in virtually every industry
14.
15. NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
16. NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
GRAPH THINKING:
Real Time Recommendations
VIEWED
VIEWED
BOUGHT
VIEWED
BOUGHT
BOUGHT
BOUGHT
BOUGHT
17. “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 CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
18. NEO4j USE CASES
Real 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
M
ANAG
ES
MANAGES
REGION
LEADS
LEADS
COLLABORATES
19. 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 CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
20. NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
GRAPH THINKING:
Fraud Detection
O
PENED_ACCO
UNT
HAS
IS_ISSUED
HAS
LIVES
LIVES
IS_ISSUED
OPENED_ACCOUNT
21. “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 Sadowski
Cyber Security Expert
NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
22. GRAPH THINKING:
Graph Based Search
NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
PUBLISH
INCLUDE
INCLUDE
CREATE
CAPTURE
IN
IN
SOURCE
USES
USES
IN
IN
USES
SOURCE
SOURCE
23. Uses Neo4j to manage the digital assets inside of its next
generation in-flight entertainment system.
NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
24. NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
BROWSES
CONNECTS
BRIDGES
ROUTES
POWERS
ROUTES
POWERS
POWERS
HOSTS
QUERIES
GRAPH THINKING:
Network & IT-Operations
25. Uses Neo4j for network topology analysis
for big telco service providers
NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
26. GRAPH THINKING:
Identity And Access Management
NEO4j USE CASES
Real Time Recommendations
Master Data Management
Fraud Detection
Identity & Access Management
Graph Based Search
Network & IT-Operations
TRUSTS
TRUSTS
ID
ID
AUTHENTICATES
AUTHENTICATES
O
W
NS
OWNS
CAN_READ
29. Graph
DatabaseRelational Database
A way of representing data
Good for:
• Well-understood data structures that
don’t change too frequently
• Known problems involving discrete parts
of the data, or minimal connectivity
Good for:
• Dynamic systems: where the data
topology is difficult to predict
• Dynamic requirements:
the evolve with the business
• Problems where the relationships in
data contribute meaning & value
37. 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
CAR
DRIVES
name: “Dan”
born: May 29, 1970
twitter: “@dan”
name: “Ann”
born: Dec 5, 1975
since:
Jan 10, 2011
brand: “Volvo”
model: “V70”
LOVES
LOVES
LIVES WITH
OW
NS
PERSON PERSON
43. Relational Versus Graph Models
Relational Model Graph Model
KNOWS
KNOWS
KNOWS
ANDREAS
TOBIAS
MICA
DELIA
Person FriendPerson-Friend
ANDREAS
DELIA
TOBIAS
MICA
Index free adjacency
44. 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
51. Cypher
Typical 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 Impact
Less time writing queries
• More time understanding the answers
• Leaving time to ask the next question
Less time debugging queries:
• More time writing the next piece of code
• Improved quality of overall code base
Code that’s easier to read:
• Faster ramp-up for new project members
• Improved maintainability & troubleshooting
53. Neo4j
Graph Database
• Property graph data model
• Nodes and relationships
• Native graph processing
• (open)Cypher query language
neo4j.com
54. Neo4j – Key Product Features
Native Graph Storage
Ensures data consistency and
performance
Native Graph Processing
Millions of hops per second, in real time
“Whiteboard Friendly” Data Modeling
Model data as it naturally occurs
High Data Integrity
Fully ACID transactions
Powerful, Expressive Query Language
Requires 10x to 100x less code than SQL
Scalability and High Availability
Vertical and horizontal scaling optimized
for graphs
Built-in ETL
Seamless import from other databases
Integration
Drivers and APIs for popular languages
MATCH
(A)
55. How do you use Neo4j?
CREATE MODEL
+
LOAD DATA QUERY DATA
64. • Complex to model and store relationships
• Performance degrades with increases in data
• Queries get long and complex
• Maintenance is painful
SQL Pains
65. • 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
87. 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;