This talk examines graph databases and Neo4j with a use-case driven approach. First, we look at some property graph model examples, taken from real-world datasets. Next we discuss converting a relational model to graph, using the canonical Northwind example. Finally, we dive into Fraud Detection and Personalized Recommendation examples, learning about Neo4j developer tooling as we explore these use cases.
23. ACCOUNT
HOLDER 2
ACCOUNT
HOLDER 1
ACCOUNT
HOLDER 3
CREDIT
CARD
BANK
ACCOUNT
BANK
ACCOUNT
BANK
ACCOUNT
ADDRESS
PHONE
NUMBER
PHONE
NUMBER
SSN 2
UNSECURED
LOAN
SSN 2
UNSECURED
LOAN
Modeling a fraud ring as a graph
66. “35 percent of what consumers purchase on
Amazon and 75 percent of what they watch on
Netflix come from product recommendations”
http://www.mckinsey.com/industries/retail/our-insights/how-retailers-can-keep-up-with-consumers
67. Product
Recommendations
Effective product recommendation
algorithms has become the new
standard in online retail — directly
affecting revenue streams and the
shopping experience.
Logistics/Delivery
Routing recommendations allows
companies to save money on routing
and delivery, and provide better and
faster service.
Promotion
recommendations
Building powerful personalized
promotion engines is another area
within retail that requires input from
multiple data sources, and real-time,
session based queries, which is an
ideal task to solve with Neo4j.
Today Recommendation Engines are At the
Core of Digitization in Retail
70. Dreamhouse
Series 15% off
The Store
Search
Hi, login
My Account
People who bought Side Table also bought:
Coffee Table
$235
Low Book Shelf
$150
Bed Side Table
$90
Mobile Brick & Mortar
Multi-Channel
Web
The
Store
People who bought Side Table also bought: Similar product in from Home Office Series:
Hi, login
My AccountSearch
Dreamhouse Series 15% off
All departments Living room | Kitchen | Hallway | Lightning | Bedroom | Garden | Home Office Space
Track Orders | Gift Cards | Store finder | Credit Card | Grocery Pickup | Help
Wood Side Table
$110
Green Side Table
$135
Walnut Side Table
$120
Coffee Table
$235
Low Book Shelf
$150
Bed Side Table
$90
Product Recommendations
71. Dreamhouse
Series 15% off
The Store
Search
Hi, login
My Account
People who bought Side Table also bought:
Coffee Table
$235
Low Book Shelf
$150
Bed Side Table
$90
Mobile Brick & Mortar
Web
The
Store
People who bought Side Table also bought: Similar product in from Home Office Series:
Hi, login
My AccountSearch
Dreamhouse Series 15% off
All departments Living room | Kitchen | Hallway | Lightning | Bedroom | Garden | Home Office Space
Track Orders | Gift Cards | Store finder | Credit Card | Grocery Pickup | Help
Wood Side Table
$110
Green Side Table
$135
Walnut Side Table
$120
Coffee Table
$235
Low Book Shelf
$150
Bed Side Table
$90
72. The
Store
People who bought Side Table also bought: Similar product in from Home Office Series:
Hi, login
My AccountSearch
Dreamhouse Series 15% off
All departments Living room | Kitchen | Hallway | Lightning | Bedroom | Garden | Home Office Space
Tra c k O rd e r s | G i f t C a rd s | S t o re fi n d e r | C re d i t C a rd | G ro c e r y P i c k u p | H e lp
Wood Side Table
$110
Green Side Table
$135
Walnut Side Table
$120
Coffee Table
$235
Low Book Shelf
$150
Bed Side Table
$90
Personalized Promotions Personalized Real-Time
Recommendations
Personalized Real-Time
Recommendations
73. People who bought Side Table also bought: Similar product in from Home Office Series:
Wood Side Table
$110
Green Side Table
$135
Walnut Side Table
$120
Coffee Table
$235
Low Book Shelf
$150
Bed Side Table
$90
Data-Model
(Expressed as
a graph)
Category
Category
Product
Product
Product
Collaborative Filtering
An algorithm that considers users
interactions with products, with the
assumption that other users will
behave in similar ways.
Algorithm Types
Content Based
An algorithm that considers
similarities between products and
categories of products.
Customer
Customer
Product
Product
Product
74. Category Price ConfigurationsLocation
Silos & Polyglot Persistence
Purchase ViewReviewReturn In-store PurchasesInventory
Products Customers / Users
Location
Purchases
RELATIONAL DB WIDE COLUMN STORE
Views
DOCUMENT STORE
User Review
RELATIONAL DB
In-Store
Purchase
Shopping Cart
KEY VALUE STORE
Product
Catalogue
DOCUMENT STORE
75. Purchases
RELATIONAL DB WIDE COLUMN STORE
Views
DOCUMENT STORE
User Review
RELATIONAL DB
In-Store
Purchase
Shopping Cart
KEY VALUE STORE
Product
Catalogue
DOCUMENT STORE
Silos & Polyglot Persistence
Category Price ConfigurationsLocation Purchase ViewReviewReturn In-store PurchasesInventory
Products Customers / Users
Location
76. Purchases
RELATIONAL DB WIDE COLUMN STORE
Views
DOCUMENT STORE
User Review
RELATIONAL DB
In-Store
Purchase
Shopping Cart
KEY VALUE STORE
Product
Catalogue
DOCUMENT STORE
Category Price ConfigurationsLocation
Polyglot Persistence
Purchase ViewReviewReturn In-store PurchasesInventory LocationCategory Price ConfigurationsLocation Purchase ViewReviewReturn In-store PurchasesInventory
Products Customers / Users
Location
77. Data Lake
Purchases
RELATIONAL DB
Product
Catalogue
DOCUMENT STORE WIDE COLUMN STORE
Views
DOCUMENT STORE
User Review
RELATIONAL DB
In-Store
Purchase
Shopping Cart
KEY VALUE STORE
Recommendations require an operational
workload — it’s in the moment, real-time!
Good for Analytics, BI, Map Reduce
Non-Operational, Slow Queries
78. Purchases
RELATIONAL DB
Product
Catalogue
DOCUMENT STORE WIDE COLUMN STORE
Views
DOCUMENT STORE
User Review
RELATIONAL DB
In-Store
Purchase
Shopping Cart
KEY VALUE STORE
Connector
Drivers: Java | JavaScript | Python | .Net | PHP | Go | Ruby
Apps and Systems
Real-Time
Queries
79. Using Data Relationships for Recommendations
Content-based filtering
Recommend items based on what
users have liked in the past
Collaborative filtering
Predict what users like based on the
similarity of their behaviors,
activities and preferences to others
Movie
Person
Person
RATED
SIMILARITY
rating: 7
value: .92