SlideShare a Scribd company logo
www.arangodb.com
Polyglot Persistence
&
Multi-Model Databases
Michael Hackstein
@mchacki
NoSQL Matters Paris
Michael Hackstein
‣ ArangoDB Core Team
‣ Web Frontend
‣ Graph visualisation
‣ Graph features
‣ Host of cologne.js
‣ Master’s Degree

(spec. Databases and

Information Systems)
2
The Single Model era is over
3
Relational World
The Multi Model era begins
4
NoSQL World
Documents - JSON
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
Graphs
Key Value
{
“type“: "pants",
“waist": 32,
“length”: 34,
“color": "blue",
“material”: “cotton"
}
{
“type“: "television",
“diagonal screen size": 46,
“hdmi inputs": 3,
“wall mountable": true,
“built-in digital tuner": true,
“dynamic contrast ratio”: “50,000:1”,
Resolution”: “1920x1080”
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
‣ Map value data to unique string keys (identifiers)
‣ Treat data as opaque (data has no schema)
‣ Can implement scaling and partitioning easily
‣ Focussed on m-to-n relations between entities
‣ Stores property graphs: entities and edges can have
attributes
‣ Easily query paths of variable length
‣ Normally based on key-value stores (each document still
has a unique key)
‣ Allow to save documents with logical similarity in
“collections”
‣ Treat data records as attribute-structured documents
(data is no more opaque)
‣ Often allow querying and indexing document attributes
An e-commerce system in Relational World
5
Sales-History
Shopping-Cart
Recommendations Customer
Product-Catalog
Polyglot Persistence
6
Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf
Reporting
RDBMS
Product Catalog
MongoDB
Shopping Cart
Riak
User activity log
Cassandra
Analytics
Cassandra
Recommendations
Neo4J
Financial Data
RDBMS
User Sessions
Redis
Shopping Cart
KeyValue
Reporting
RDBMS
Product Catalog
Document
User activity log
Column
Analytics
Column
Recommendations
Graph
Financial Data
RDBMS
User Sessions
KeyValue
Single Model Databases
7
Recommendations
Product-CatalogShopping-Cart
Sales-History Customer
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“Name": "Smith",
“lastLogin”: “2012-11-01",
“Visits": 121,
“shipping address”: “abc”,
“shipping address”: “def”
}
{
“Name": "Meyer",
“lastLogin”: “2012-11-21",
“Visits": 20,
“shipping address”: “xyz”,
}
423453453
4328, “shirt”, “L”, 1, 12.99
6378, “sweater”, “M”, 2, 37.95
3245, “sweater”, “blue”, 1, 99.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
874365563
5463, “shirt”, “S”, 1, 9.99
6378, “sweater”, “M”, 2, 37.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
{
“type“: "pants",
“waist": 32,
“length”: 34,
“color": "blue",
“material”: “cotton"
}
{
“type“: "television",
“diagonal screen size": 46,
“hdmi inputs": 3,
“wall mountable": true,
“built-in digital tuner": true,
“dynamic contrast ratio”: “50,000:1”,
Resolution”: “1920x1080”
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
DocumentStore GraphStore DocumentStore
DocumentStoreKeyValueStore
Benefits
‣ Natural mapping of data
into DB
‣ DB optimized for the data
format
‣ Queries are tailored for
your data format
‣ Focus on writing business
logic
8
‣ Data has to be stored
redundantly and has to be
kept in sync
‣ Several technologies
involved
‣ Administration effort is
huge
Overhead&
Solution: Multi Model Database
‣ Can natively store several kinds of data models:
‣ Key-value pairs
‣ Documents
‣ Graphs
‣ Delivers query mechanisms for all data models
9
Polyglot Persistence Revisited
10
Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf
Shopping Cart
KeyValue
Reporting
RDBMS
Product Catalog
Document
User activity log
Column
Analytics
Column
Recommendations
Graph
Financial Data
RDBMS
User Sessions
KeyValue
Reporting
RDBMS
Product Catalog
ArangoDB
Shopping Cart
ArangoDB
User activity log
Cassandra
Analytics
Cassandra
Recommendations
ArangoDB
Financial Data
ArangoDB
User Sessions
ArangoDB
Use Case: Multi-Model-Databases
11
Recommendations
Product-CatalogShopping-Cart
Sales-History Customer
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“Name": "Smith",
“lastLogin”: “2012-11-01",
“Visits": 121,
“shipping address”: “abc”,
“shipping address”: “def”
}
{
“Name": "Meyer",
“lastLogin”: “2012-11-21",
“Visits": 20,
“shipping address”: “xyz”,
}
423453453
4328, “shirt”, “L”, 1, 12.99
6378, “sweater”, “M”, 2, 37.95
3245, “sweater”, “blue”, 1, 99.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
874365563
5463, “shirt”, “S”, 1, 9.99
6378, “sweater”, “M”, 2, 37.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
{
“type“: "pants",
“waist": 32,
“length”: 34,
“color": "blue",
“material”: “cotton"
}
{
“type“: "television",
“diagonal screen size": 46,
“hdmi inputs": 3,
“wall mountable": true,
“built-in digital tuner": true,
“dynamic contrast ratio”: “50,000:1”,
Resolution”: “1920x1080”
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
DocumentStore GraphStore DocumentStore
DocumentStoreKeyValueStore
My four favorite features of
‣ AQL offering joins & traversals
‣ ACID including Multi Collection Transactions
‣ MULTI-MODEL stores graphs and documents
12
‣ FOXX extend the API and adapt it to your needs
AQL
13
FOR p IN products
RETURN p
FILTER p.color == "yellow"
FOR d IN GRAPH_DISTANCE_TO("ecom", p._id,
"customer/alice", {direction: "inbound"})
LET r = {distance: x.distance, product: p}
FILTER r.distance > 1
SORT r.distance
LIMIT 10
RETURN r
ACID - Transactions
‣ Invoke a transaction:
db._executeTransaction({
collections: {
write: ["users", "products"],
read: "recommendations"
},
action: function() {
// all operations go here
}
});
14
throw "failure"; // Triggers rollback
‣ Native mapping of data into
DB
‣ DB optimized
‣ Queries are tailored for
your data format
‣ Focus on writing business
logic
15
‣ Data has to be stored
redundantly and has to be
kept in sync
‣ Several technologies
‣ Administration effort is
‣ One technology involved
Benefits Overhead&
Foxx
‣ Add your own customized and versioned REST-API on top of
ArangoDB in JavaScript
‣ Include as a microservice in Rails, Node.js etc.
‣ Ship an administration fronted with it
‣ Built-in authentication using OAuth2.0 or HTTP-Basic Auth
‣ Operations are encapsulated in the database
‣ low network traffic, direct data access
‣ increases data privacy
➡ Multi-device setups
➡ Microservice Architectures
/
(~(
) ) /_/
( _-----_(@ @)
(  /
/|/--| V
" " " "
16
Foxx Example
17
FOR p IN products
FILTER p.color == @color
FOR d IN GRAPH_DISTANCE_TO("ecom", p._id,
"customer/alice", {direction: "inbound"})
LET r = {distance: x.distance, product: p}
FILTER r.distance > 1
SORT r.distance
LIMIT 10
RETURN r',
controller.get("/recommend/:color", function(req, res) {
res.json(db._query('FOR p IN products
});
{color: req.params("color")}).toArray());
‣ open source and free (Apache 2 license)
‣ sharding & replication
‣ JavaScript throughout (V8 built into server)
‣ drivers for a wide range of languages
‣ web frontend
‣ good & complete documentation
‣ professional as well as community support
18
An overview of other features
Join our growing community
19
.. working on the geo index, the full text search and
many APIs: Ruby, Python, PHP, Java, D, Javascript, ...
Thank you
‣ Further questions?
‣ Follow me on twitter/github: @mchacki
‣ Write me a mail: mchacki@arangodb.com
‣ Join or google group: https://groups.google.com/forum/#!forum/arangodb
20

More Related Content

What's hot (20)

PDF
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
MongoDB
 
PDF
Webinar: How native multi model works in ArangoDB
ArangoDB Database
 
PDF
Data persistence using pouchdb and couchdb
Dimgba Kalu
 
PDF
Faites évoluer votre accès aux données avec MongoDB Stitch
MongoDB
 
PDF
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
MongoDB
 
KEY
CouchDB : More Couch
delagoya
 
PPTX
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
MongoDB
 
PDF
MongoDB Atlas Workshop - Singapore
Ashnikbiz
 
PDF
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB
 
PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB World 2019: MongoDB in Data Science: How to Build a Scalable Product ...
MongoDB
 
PPTX
Jumpstart: MongoDB BI Connector & Tableau
MongoDB
 
PDF
From RDBMS to MongoDB
MongoDB
 
PDF
Visualize your graph database
Michael Hackstein
 
PPTX
Teradata QueryGrid to MongoDB Lightning Introduction
MongoDB
 
PDF
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB
 
PPTX
Query in Couchbase. N1QL: SQL for JSON
Keshav Murthy
 
PDF
Key note big data analytics ecosystem strategy
IBM Sverige
 
PDF
MongoDB World 2019: Ticketek: Scaling to Global Ticket Sales with MongoDB Atlas
MongoDB
 
PDF
MongoDB on Azure
Norberto Leite
 
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
MongoDB
 
Webinar: How native multi model works in ArangoDB
ArangoDB Database
 
Data persistence using pouchdb and couchdb
Dimgba Kalu
 
Faites évoluer votre accès aux données avec MongoDB Stitch
MongoDB
 
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
MongoDB
 
CouchDB : More Couch
delagoya
 
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
MongoDB
 
MongoDB Atlas Workshop - Singapore
Ashnikbiz
 
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB World 2019: MongoDB in Data Science: How to Build a Scalable Product ...
MongoDB
 
Jumpstart: MongoDB BI Connector & Tableau
MongoDB
 
From RDBMS to MongoDB
MongoDB
 
Visualize your graph database
Michael Hackstein
 
Teradata QueryGrid to MongoDB Lightning Introduction
MongoDB
 
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB
 
Query in Couchbase. N1QL: SQL for JSON
Keshav Murthy
 
Key note big data analytics ecosystem strategy
IBM Sverige
 
MongoDB World 2019: Ticketek: Scaling to Global Ticket Sales with MongoDB Atlas
MongoDB
 
MongoDB on Azure
Norberto Leite
 

Similar to Michael Hackstein - Polyglot Persistence & Multi-Model NoSQL Databases - NoSQL matters Paris 2015 (20)

PDF
Multi model-databases
ArangoDB Database
 
PDF
ArangoDB – A different approach to NoSQL
ArangoDB Database
 
PDF
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafka
Guido Schmutz
 
PDF
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
Valentine Gogichashvili
 
PDF
Cloud Native Applications on OpenShift
Serhat Dirik
 
PDF
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
Ontico
 
PDF
Intro to Exhibit Workshop
Shawn Day
 
PDF
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Max Klymyshyn
 
PDF
NoSQL meets Microservices - Michael Hackstein
distributed matters
 
PDF
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Guido Schmutz
 
KEY
Taming NoSQL with Spring Data
Sergi Almar i Graupera
 
PDF
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
confluent
 
PDF
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz
 
PDF
Improving Transactional Applications with Analytics
DATAVERSITY
 
PPTX
Scale By The Bay | 2020 | Gimel
Deepak Chandramouli
 
PDF
ArangoDB
ArangoDB Database
 
PPTX
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
In-Memory Computing Summit
 
PDF
Accelerate Big Data Application Development with Cascading
Cascading
 
PDF
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz
 
PDF
Headless approach for offloading heavy tasks in Magento
Sander Mangel
 
Multi model-databases
ArangoDB Database
 
ArangoDB – A different approach to NoSQL
ArangoDB Database
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafka
Guido Schmutz
 
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
Valentine Gogichashvili
 
Cloud Native Applications on OpenShift
Serhat Dirik
 
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
Ontico
 
Intro to Exhibit Workshop
Shawn Day
 
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Max Klymyshyn
 
NoSQL meets Microservices - Michael Hackstein
distributed matters
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Guido Schmutz
 
Taming NoSQL with Spring Data
Sergi Almar i Graupera
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
confluent
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz
 
Improving Transactional Applications with Analytics
DATAVERSITY
 
Scale By The Bay | 2020 | Gimel
Deepak Chandramouli
 
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
In-Memory Computing Summit
 
Accelerate Big Data Application Development with Cascading
Cascading
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz
 
Headless approach for offloading heavy tasks in Magento
Sander Mangel
 

More from NoSQLmatters (20)

PDF
Nathan Ford- Divination of the Defects (Graph-Based Defect Prediction through...
NoSQLmatters
 
PDF
Stefan Hochdörfer - The NoSQL Store everyone ignores: PostgreSQL - NoSQL matt...
NoSQLmatters
 
PDF
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
NoSQLmatters
 
PDF
Peter Bakas - Zero to Insights - Real time analytics with Kafka, C*, and Spar...
NoSQLmatters
 
PDF
Dan Sullivan - Data Analytics and Text Mining with MongoDB - NoSQL matters Du...
NoSQLmatters
 
PDF
Mark Harwood - Building Entity Centric Indexes - NoSQL matters Dublin 2015
NoSQLmatters
 
PDF
Prassnitha Sampath - Real Time Big Data Analytics with Kafka, Storm & HBase -...
NoSQLmatters
 
PDF
Akmal Chaudhri - How to Build Streaming Data Applications: Evaluating the Top...
NoSQLmatters
 
PDF
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
NoSQLmatters
 
PDF
Chris Ward - Understanding databases for distributed docker applications - No...
NoSQLmatters
 
PDF
Philipp Krenn - Host your database in the cloud, they said... - NoSQL matters...
NoSQLmatters
 
PDF
Lucian Precup - Back to the Future: SQL 92 for Elasticsearch? - NoSQL matters...
NoSQLmatters
 
PDF
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
NoSQLmatters
 
PDF
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
NoSQLmatters
 
PDF
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
NoSQLmatters
 
PDF
David Pilato - Advance search for your legacy application - NoSQL matters Par...
NoSQLmatters
 
PDF
Tugdual Grall - From SQL to NoSQL in less than 40 min - NoSQL matters Paris 2015
NoSQLmatters
 
PDF
Gregorry Letribot - Druid at Criteo - NoSQL matters 2015
NoSQLmatters
 
PDF
Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015
NoSQLmatters
 
PDF
Alexandre Vasseur - Evolution of Data Architectures: From Hadoop to Data Lake...
NoSQLmatters
 
Nathan Ford- Divination of the Defects (Graph-Based Defect Prediction through...
NoSQLmatters
 
Stefan Hochdörfer - The NoSQL Store everyone ignores: PostgreSQL - NoSQL matt...
NoSQLmatters
 
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
NoSQLmatters
 
Peter Bakas - Zero to Insights - Real time analytics with Kafka, C*, and Spar...
NoSQLmatters
 
Dan Sullivan - Data Analytics and Text Mining with MongoDB - NoSQL matters Du...
NoSQLmatters
 
Mark Harwood - Building Entity Centric Indexes - NoSQL matters Dublin 2015
NoSQLmatters
 
Prassnitha Sampath - Real Time Big Data Analytics with Kafka, Storm & HBase -...
NoSQLmatters
 
Akmal Chaudhri - How to Build Streaming Data Applications: Evaluating the Top...
NoSQLmatters
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
NoSQLmatters
 
Chris Ward - Understanding databases for distributed docker applications - No...
NoSQLmatters
 
Philipp Krenn - Host your database in the cloud, they said... - NoSQL matters...
NoSQLmatters
 
Lucian Precup - Back to the Future: SQL 92 for Elasticsearch? - NoSQL matters...
NoSQLmatters
 
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
NoSQLmatters
 
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
NoSQLmatters
 
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
NoSQLmatters
 
David Pilato - Advance search for your legacy application - NoSQL matters Par...
NoSQLmatters
 
Tugdual Grall - From SQL to NoSQL in less than 40 min - NoSQL matters Paris 2015
NoSQLmatters
 
Gregorry Letribot - Druid at Criteo - NoSQL matters 2015
NoSQLmatters
 
Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015
NoSQLmatters
 
Alexandre Vasseur - Evolution of Data Architectures: From Hadoop to Data Lake...
NoSQLmatters
 

Recently uploaded (20)

PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 

Michael Hackstein - Polyglot Persistence & Multi-Model NoSQL Databases - NoSQL matters Paris 2015

  • 2. Michael Hackstein ‣ ArangoDB Core Team ‣ Web Frontend ‣ Graph visualisation ‣ Graph features ‣ Host of cologne.js ‣ Master’s Degree
 (spec. Databases and
 Information Systems) 2
  • 3. The Single Model era is over 3 Relational World
  • 4. The Multi Model era begins 4 NoSQL World Documents - JSON K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V Graphs Key Value { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } { “type“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } ‣ Map value data to unique string keys (identifiers) ‣ Treat data as opaque (data has no schema) ‣ Can implement scaling and partitioning easily ‣ Focussed on m-to-n relations between entities ‣ Stores property graphs: entities and edges can have attributes ‣ Easily query paths of variable length ‣ Normally based on key-value stores (each document still has a unique key) ‣ Allow to save documents with logical similarity in “collections” ‣ Treat data records as attribute-structured documents (data is no more opaque) ‣ Often allow querying and indexing document attributes
  • 5. An e-commerce system in Relational World 5 Sales-History Shopping-Cart Recommendations Customer Product-Catalog
  • 6. Polyglot Persistence 6 Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf Reporting RDBMS Product Catalog MongoDB Shopping Cart Riak User activity log Cassandra Analytics Cassandra Recommendations Neo4J Financial Data RDBMS User Sessions Redis Shopping Cart KeyValue Reporting RDBMS Product Catalog Document User activity log Column Analytics Column Recommendations Graph Financial Data RDBMS User Sessions KeyValue
  • 7. Single Model Databases 7 Recommendations Product-CatalogShopping-Cart Sales-History Customer { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “Name": "Smith", “lastLogin”: “2012-11-01", “Visits": 121, “shipping address”: “abc”, “shipping address”: “def” } { “Name": "Meyer", “lastLogin”: “2012-11-21", “Visits": 20, “shipping address”: “xyz”, } 423453453 4328, “shirt”, “L”, 1, 12.99 6378, “sweater”, “M”, 2, 37.95 3245, “sweater”, “blue”, 1, 99.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => 874365563 5463, “shirt”, “S”, 1, 9.99 6378, “sweater”, “M”, 2, 37.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } { “type“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } DocumentStore GraphStore DocumentStore DocumentStoreKeyValueStore
  • 8. Benefits ‣ Natural mapping of data into DB ‣ DB optimized for the data format ‣ Queries are tailored for your data format ‣ Focus on writing business logic 8 ‣ Data has to be stored redundantly and has to be kept in sync ‣ Several technologies involved ‣ Administration effort is huge Overhead&
  • 9. Solution: Multi Model Database ‣ Can natively store several kinds of data models: ‣ Key-value pairs ‣ Documents ‣ Graphs ‣ Delivers query mechanisms for all data models 9
  • 10. Polyglot Persistence Revisited 10 Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf Shopping Cart KeyValue Reporting RDBMS Product Catalog Document User activity log Column Analytics Column Recommendations Graph Financial Data RDBMS User Sessions KeyValue Reporting RDBMS Product Catalog ArangoDB Shopping Cart ArangoDB User activity log Cassandra Analytics Cassandra Recommendations ArangoDB Financial Data ArangoDB User Sessions ArangoDB
  • 11. Use Case: Multi-Model-Databases 11 Recommendations Product-CatalogShopping-Cart Sales-History Customer { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “Name": "Smith", “lastLogin”: “2012-11-01", “Visits": 121, “shipping address”: “abc”, “shipping address”: “def” } { “Name": "Meyer", “lastLogin”: “2012-11-21", “Visits": 20, “shipping address”: “xyz”, } 423453453 4328, “shirt”, “L”, 1, 12.99 6378, “sweater”, “M”, 2, 37.95 3245, “sweater”, “blue”, 1, 99.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => 874365563 5463, “shirt”, “S”, 1, 9.99 6378, “sweater”, “M”, 2, 37.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } { “type“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } DocumentStore GraphStore DocumentStore DocumentStoreKeyValueStore
  • 12. My four favorite features of ‣ AQL offering joins & traversals ‣ ACID including Multi Collection Transactions ‣ MULTI-MODEL stores graphs and documents 12 ‣ FOXX extend the API and adapt it to your needs
  • 13. AQL 13 FOR p IN products RETURN p FILTER p.color == "yellow" FOR d IN GRAPH_DISTANCE_TO("ecom", p._id, "customer/alice", {direction: "inbound"}) LET r = {distance: x.distance, product: p} FILTER r.distance > 1 SORT r.distance LIMIT 10 RETURN r
  • 14. ACID - Transactions ‣ Invoke a transaction: db._executeTransaction({ collections: { write: ["users", "products"], read: "recommendations" }, action: function() { // all operations go here } }); 14 throw "failure"; // Triggers rollback
  • 15. ‣ Native mapping of data into DB ‣ DB optimized ‣ Queries are tailored for your data format ‣ Focus on writing business logic 15 ‣ Data has to be stored redundantly and has to be kept in sync ‣ Several technologies ‣ Administration effort is ‣ One technology involved Benefits Overhead&
  • 16. Foxx ‣ Add your own customized and versioned REST-API on top of ArangoDB in JavaScript ‣ Include as a microservice in Rails, Node.js etc. ‣ Ship an administration fronted with it ‣ Built-in authentication using OAuth2.0 or HTTP-Basic Auth ‣ Operations are encapsulated in the database ‣ low network traffic, direct data access ‣ increases data privacy ➡ Multi-device setups ➡ Microservice Architectures / (~( ) ) /_/ ( _-----_(@ @) ( / /|/--| V " " " " 16
  • 17. Foxx Example 17 FOR p IN products FILTER p.color == @color FOR d IN GRAPH_DISTANCE_TO("ecom", p._id, "customer/alice", {direction: "inbound"}) LET r = {distance: x.distance, product: p} FILTER r.distance > 1 SORT r.distance LIMIT 10 RETURN r', controller.get("/recommend/:color", function(req, res) { res.json(db._query('FOR p IN products }); {color: req.params("color")}).toArray());
  • 18. ‣ open source and free (Apache 2 license) ‣ sharding & replication ‣ JavaScript throughout (V8 built into server) ‣ drivers for a wide range of languages ‣ web frontend ‣ good & complete documentation ‣ professional as well as community support 18 An overview of other features
  • 19. Join our growing community 19 .. working on the geo index, the full text search and many APIs: Ruby, Python, PHP, Java, D, Javascript, ...
  • 20. Thank you ‣ Further questions? ‣ Follow me on twitter/github: @mchacki ‣ Write me a mail: [email protected] ‣ Join or google group: https://groups.google.com/forum/#!forum/arangodb 20