SlideShare a Scribd company logo
Building a recommendation
engine with TinkerPop
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org
NoSQL
● Database
● Doesn't use structure
● Not Transaction
● BASE
● Types
Graph
● Neo4j
● InfoGrid
● Sones
● HyperGraphDB
Apollo Ares
Kratoswas killed by was killed by
Is brother
killed killed
SQL Key-value Document Column Graph
Table Bucket Collection Column
Family
Vertex and
Edge
Row Key/value
pair
Document Column Vertex
Column Key/value
pair
Key/value
pair
Vertex and
Edge property
Relationship Link Edge
Scalability vs Complexity
S
c
a
l
a
b
i
l
i
t
y
Complexity
Scalability vs Complexity
S
c
a
l
a
b
i
l
i
t
y
Complexity
key-value
Column
Document
Graph
Graph
Grace Hopper
label Person
id ada
name Ada Lovelace
occupation scientist
Ada Lovelace
label Person
id grace
name Grace Hopper
occupation scientist
Knows
Vertex Vertex
Edge
Graph
Radioactive
label Person
id marie_curie
name Marie Curie
occupation scientist
Marie Curie
label nature
id radioactive
name Radioactive
discovers
when 1867
where Europe
Graph Database
TinkerPop
TinkerPop
Grace Hopper
label Person
id grace
name Grace Hopper
occupation scientist
Vertex
grace = graph.addVertex(
T.label, "person",
"id", "grace",
"name", "Grace Hopper",
"occupation", "scientist");
TinkerPop
Grace
Hopper
Ada
Lovelace
Knows
grace.addEdge("knows", ada);
Edges
Out ->
In <-
Both
Marketing
Campaign
● Engineer
● Salary 3000
● Age between 20 and 25 years
● Man
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT * FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25));
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT name FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.values("name");
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT count(*) FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.count();
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.groupCount()
.by(“city”);
Their Friends
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT * FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25//...joins
Id know
... ...
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.out("knows");
Falling in love
SQLId name Occupation Salary age gender
... ... ... ... ... ...
SELECT * FROM Person WHERE
occupation = "Engineer" AND
salary > 3000 and age BETWEEN 20
AND 25//...joins
Id know
... ...
Id love
... ...
TinkerPopGrace
Hopper
Ada
Lovelace
Knows
g.V().has("occupation","Engineer")
.has("salary", gt(3000))
.has("age", between(20, 25))
.outE("knows")
.has("feel", "love")
.bothV();
g.V().repeat(out("eats"))
.times(3);
g.V().repeat(out("eats"))
.until(has("name", "grass"));
//path().by("name");
Building a recommendation engine with tinker pop
TinkerPop
Our database
is too slow and
not big enough!
We need
NoSql!
Thank You
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org

More Related Content

PPTX
Ceis295 final project_b_cooper
PDF
The DataTank at ogdcamp Warsaw
PPTX
Semantic web for ontology chapter4 bynk
PPTX
LSD Dimensions: Use and Reuse of Linked Statistical Data as RDF Data Cube
PPTX
Linked list - Data structure
PDF
NoSQL design pitfalls with Java
PDF
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
PDF
Architecting Cloud Computing Solutions with Java [1.1]
Ceis295 final project_b_cooper
The DataTank at ogdcamp Warsaw
Semantic web for ontology chapter4 bynk
LSD Dimensions: Use and Reuse of Linked Statistical Data as RDF Data Cube
Linked list - Data structure
NoSQL design pitfalls with Java
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Architecting Cloud Computing Solutions with Java [1.1]

More from Otávio Santana (20)

PDF
Arquitetando soluções de computação em nuvem com Java
PDF
Build, run, and scale your Java applications end to end
PDF
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
PDF
ORMs: Heroes or Villains Inside the Architecture?
PDF
Jakarta EE Meets NoSQL at the Cloud Age
PDF
Boost your APIs with GraphQL 1.0
PDF
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
PDF
Let’s Make Graph Databases Fun Again with Java [DEV6043]
PDF
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
PDF
The new generation of data persistence with graph
PDF
Eclipse JNoSQL updates from JCP September 11
PDF
Stateless Microservice Security via JWT and MicroProfile - Guatemala
PDF
Stateless Microservice Security via JWT and MicroProfile - Mexico
PDF
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
PDF
Polyglot persistence
PDF
Management 3.0 and open source
PDF
Building a Recommendation Engine with Java EE
PDF
Cassandra NoSQL, NoLimits!
PDF
Disasters of the century NoSQL
PDF
NoSQL, no Limits, lots of Fun!
Arquitetando soluções de computação em nuvem com Java
Build, run, and scale your Java applications end to end
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
ORMs: Heroes or Villains Inside the Architecture?
Jakarta EE Meets NoSQL at the Cloud Age
Boost your APIs with GraphQL 1.0
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Let’s Make Graph Databases Fun Again with Java [DEV6043]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
The new generation of data persistence with graph
Eclipse JNoSQL updates from JCP September 11
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Mexico
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Polyglot persistence
Management 3.0 and open source
Building a Recommendation Engine with Java EE
Cassandra NoSQL, NoLimits!
Disasters of the century NoSQL
NoSQL, no Limits, lots of Fun!
Ad

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Electronic commerce courselecture one. Pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Spectroscopy.pptx food analysis technology
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Big Data Technologies - Introduction.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
MIND Revenue Release Quarter 2 2025 Press Release
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Ad

Building a recommendation engine with tinker pop