SlideShare a Scribd company logo
www.arangodb.com 
Polyglot Persistence 
& 
Multi-Model Databases 
London Java Community 
28-10-2014 
Michael Hackstein 
@mchacki
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 
‣ Normally based on key-value stores (each document still 
4 
NoSQL World 
Documents - JSON 
{ 
“type": "sweater", 
“color": "blue", 
“size": “M”, 
“material”: “wool”, 
“form”: “turtleneck" 
} 
{ 
“type“: "pants", 
“waist": 32, 
“length”: 34, 
“color": "blue", 
“material”: “cotton" 
} 
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 
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 
‣ Focussed on m-to-n relations between entities 
‣ Stores property graphs: entities and edges can have 
‣ Easily query paths of variable length 
K => V 
K => V 
K => V 
K => V 
{ 
“type": "sweater", 
“color": "blue", 
“size": “M”, 
“material”: “wool”, 
“form”: “turtleneck" 
} 
attributes 
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“: "television", 
“diagonal screen size": 46, 
“hdmi inputs": 3, 
“wall mountable": true, 
“built-in digital tuner": true, 
“dynamic contrast ratio”: “50,000:1”, 
Resolution”: “1920x1080” 
} 
‣ Map value data to unique string keys (identifiers) 
‣ Treat data as opaque (data has no schema) 
‣ Can implement scaling and partitioning easily
An e-commerce system in Relational World 
5 
Sales-History 
Shopping-Cart 
Recommendations Customer 
Product-Catalog
Polyglot Persistence 
6 
Shopping Cart 
Product Catalog 
MongoDB 
Reporting 
RDBMS 
Financial Data 
RDBMS 
Recommendations 
Neo4J 
Analytics 
Cassandra 
Product Catalog 
Document 
Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf 
Riak 
User activity log 
Cassandra 
User Sessions 
Redis 
Shopping Cart 
KeyValue 
Reporting 
RDBMS 
Financial Data 
RDBMS 
Recommendations 
Graph 
Analytics 
Column 
User activity log 
Column 
User Sessions 
KeyValue
Single Model Databases 
7 
Sales-History Recommendations 
Customer 
{ 
“userID": 239178239, 
“productID”: 128623883, 
“number": 5, 
“price”: 12.20, 
} 
DocumentStore GraphStore DocumentStore 
{ 
“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”, 
} 
{ 
“type": "sweater", 
“color": "blue", 
“size": “M”, 
“material”: “wool”, 
“form”: “turtleneck" 
} 
{ 
“type": "sweater", 
“color": "blue", 
“size": “M”, 
“material”: “wool”, 
“form”: “turtleneck" 
} 
Shopping-Cart Product-Catalog 
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” 
} 
KeyValueStore DocumentStore
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 
& Overhead 
‣Data has to be stored 
redundantly and has to be 
kept in sync 
‣Several technologies 
involved 
‣Administration effort is 
huge
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 
Financial Data 
ArangoDB 
Recommendations 
ArangoDB 
10 
User Sessions 
KeyValue 
Shopping Cart 
KeyValue 
Product Catalog 
Document 
Reporting 
RDBMS 
Financial Data 
RDBMS 
Recommendations 
Graph 
Analytics 
Column 
User activity log 
Column 
Shopping Cart 
ArangoDB 
Product Catalog 
ArangoDB 
Reporting 
RDBMS 
Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf 
Analytics 
Cassandra 
User activity log 
Cassandra 
User Sessions 
ArangoDB
Use Case: Multi-Model-Databases 
11 
Sales-History Recommendations 
Customer 
{ 
“userID": 239178239, 
“productID”: 128623883, 
“number": 5, 
“price”: 12.20, 
} 
DocumentStore GraphStore DocumentStore 
{ 
“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”, 
} 
{ 
“type": "sweater", 
“color": "blue", 
“size": “M”, 
“material”: “wool”, 
“form”: “turtleneck" 
} 
{ 
“type": "sweater", 
“color": "blue", 
“size": “M”, 
“material”: “wool”, 
“form”: “turtleneck" 
} 
Shopping-Cart Product-Catalog 
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” 
} 
KeyValueStore DocumentStore
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 
‣Document Query: 
FOR user IN users FILTER user.active == true 
FOR game IN games FILTER game.player == user._id 
RETURN { 
username: user.name, 
score: game.score 
} 
‣ Modify Documents: 
FOR u IN users FILTER u.status == 'not active' 
UPDATE u WITH { active: false } IN users 
! 
‣ Graph Traversal: 
RETURN GRAPH_TRAVERSAL( 
"underground_plan", „stations/main_station", 
"outbound", {minDepth: 2, maxDepth: 5} 
) 
13
ACID - Transactions 
‣ Invoke a transaction: 
db._executeTransaction({ 
collections: { 
write: ["users", "products"], 
read: "recommendations" 
}, 
action: function() { 
// all operations go here 
! 
} 
}); 
14 
throw "failure"; // Triggers rollback
Benefits & Overhead 
‣ 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
Foxx 
‣ Add your own customized and versioned REST-API on top of 
ArangoDB in JavaScript 
‣ Include as a web service in Rails, Node.js etc. 
‣ Use as storage for Web-frameworks like AngularJS, EmberJS, Backbone etc. 
‣ 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 
➡Microservices 
/ 
(~( 
) ) /_/ 
( _-----_(@ @) 
(  / 
/|/--| V 
" " " " 
16
‣ 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 
17 
An overview of other features
Join our growing community 
18 
.. 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 
19

More Related Content

What's hot (20)

PPTX
Web Browser Controls in Adlib: The Hidden Diamond in the Adlib Treasure Chest
Axiell ALM
 
PDF
CenitHub: Introduction
Miguel Sancho
 
PDF
An E-commerce App in action built on top of a Multi-model Database
ArangoDB Database
 
PDF
Query Languages for Document Stores
InteractiveCologne
 
PPTX
CData Data Today: A Developer's Dilemma
Jerod Johnson
 
PPTX
DocumentDB - NoSQL on Cloud at Reboot2015
Vidyasagar Machupalli
 
PDF
Analyze and visualize non-relational data with DocumentDB + Power BI
Sriram Hariharan
 
PPTX
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Treasure Data, Inc.
 
PPTX
Jumpstart: MongoDB BI Connector & Tableau
MongoDB
 
PDF
MongoDB .local London 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
Data persistence using pouchdb and couchdb
Dimgba Kalu
 
PPTX
Azure DocumentDB for Healthcare Integration
BizTalk360
 
PDF
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB
 
PDF
Backbone using Extensible Database APIs over HTTP
Max Neunhöffer
 
PDF
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
DOCX
SharePoint Content Database Sizing-BLOB-Crawl
E Blake
 
PPTX
MongoDB .local Munich 2019: Telediagnosis@Daimler powered by MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PPTX
MongoDB and Azure Databricks
MongoDB
 
PPTX
C* Summit 2013: Optimizing the Public Cloud for Cost and Scalability with Cas...
DataStax Academy
 
Web Browser Controls in Adlib: The Hidden Diamond in the Adlib Treasure Chest
Axiell ALM
 
CenitHub: Introduction
Miguel Sancho
 
An E-commerce App in action built on top of a Multi-model Database
ArangoDB Database
 
Query Languages for Document Stores
InteractiveCologne
 
CData Data Today: A Developer's Dilemma
Jerod Johnson
 
DocumentDB - NoSQL on Cloud at Reboot2015
Vidyasagar Machupalli
 
Analyze and visualize non-relational data with DocumentDB + Power BI
Sriram Hariharan
 
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Treasure Data, Inc.
 
Jumpstart: MongoDB BI Connector & Tableau
MongoDB
 
MongoDB .local London 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
Data persistence using pouchdb and couchdb
Dimgba Kalu
 
Azure DocumentDB for Healthcare Integration
BizTalk360
 
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB
 
Backbone using Extensible Database APIs over HTTP
Max Neunhöffer
 
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
SharePoint Content Database Sizing-BLOB-Crawl
E Blake
 
MongoDB .local Munich 2019: Telediagnosis@Daimler powered by MongoDB
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB and Azure Databricks
MongoDB
 
C* Summit 2013: Optimizing the Public Cloud for Cost and Scalability with Cas...
DataStax Academy
 

Viewers also liked (13)

PDF
Wir sind aber nicht Twitter
ArangoDB Database
 
PDF
Guacamole
ArangoDB Database
 
PDF
Domain Driven Design and NoSQL TLV
ArangoDB Database
 
PDF
CAP and the Architectural Consequences by martin Schönert
ArangoDB Database
 
PDF
Polyglot Persistence & Multi Model-Databases at JMaghreb3.0
ArangoDB Database
 
PDF
NoSQL meets Microservices
ArangoDB Database
 
PDF
Creating Fault Tolerant Services on Mesos
ArangoDB Database
 
PDF
Row or Columnar Database
Biju Nair
 
PDF
Introduction to column oriented databases
ArangoDB Database
 
PDF
Query mechanisms for NoSQL databases
ArangoDB Database
 
PDF
Domain Driven Design und Nosql
ArangoDB Database
 
PDF
Einführung in nosql // ArangoDB mit Symfony 2
ArangoDB Database
 
PDF
SlideShare 101
Amit Ranjan
 
Wir sind aber nicht Twitter
ArangoDB Database
 
Domain Driven Design and NoSQL TLV
ArangoDB Database
 
CAP and the Architectural Consequences by martin Schönert
ArangoDB Database
 
Polyglot Persistence & Multi Model-Databases at JMaghreb3.0
ArangoDB Database
 
NoSQL meets Microservices
ArangoDB Database
 
Creating Fault Tolerant Services on Mesos
ArangoDB Database
 
Row or Columnar Database
Biju Nair
 
Introduction to column oriented databases
ArangoDB Database
 
Query mechanisms for NoSQL databases
ArangoDB Database
 
Domain Driven Design und Nosql
ArangoDB Database
 
Einführung in nosql // ArangoDB mit Symfony 2
ArangoDB Database
 
SlideShare 101
Amit Ranjan
 
Ad

Similar to Multi model-databases 29-10-2014 LJC (20)

PDF
Polyglot Persistence & Multi-Model Databases (FullStack Toronto)
ArangoDB Database
 
PDF
OSDC 2015: Ingo Friepoertner | Polyglot Persistence & Multi-Model NoSQL Datab...
NETWAYS
 
PDF
Multi model-databases
Michael Hackstein
 
PDF
Polyglot Persistence & Multi-Model Databases
ArangoDB Database
 
PDF
Oslo baksia2014
Max Neunhöffer
 
PDF
Oslo bekk2014
Max Neunhöffer
 
PPTX
Nosql Now 2012: MongoDB Use Cases
MongoDB
 
PDF
ArangoDB – A different approach to NoSQL
ArangoDB Database
 
KEY
Optimize drupal using mongo db
Vladimir Ilic
 
PDF
Is multi-model the future of NoSQL?
Max Neunhöffer
 
PDF
Steam Learn: Introduction to NoSQL with MongoDB
inovia
 
PPT
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
 
PPTX
Common MongoDB Use Cases Webinar
MongoDB
 
PPTX
JSON Data Modeling - July 2018 - Tulsa Techfest
Matthew Groves
 
KEY
MongoDB, E-commerce and Transactions
Steven Francia
 
KEY
Hybrid MongoDB and RDBMS Applications
Steven Francia
 
PDF
Common MongoDB Use Cases
DATAVERSITY
 
KEY
mongoDB at Visibiz
Mike Brocious
 
PPTX
MediaGlu and Mongo DB
Sundar Nathikudi
 
PPTX
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Polyglot Persistence & Multi-Model Databases (FullStack Toronto)
ArangoDB Database
 
OSDC 2015: Ingo Friepoertner | Polyglot Persistence & Multi-Model NoSQL Datab...
NETWAYS
 
Multi model-databases
Michael Hackstein
 
Polyglot Persistence & Multi-Model Databases
ArangoDB Database
 
Oslo baksia2014
Max Neunhöffer
 
Oslo bekk2014
Max Neunhöffer
 
Nosql Now 2012: MongoDB Use Cases
MongoDB
 
ArangoDB – A different approach to NoSQL
ArangoDB Database
 
Optimize drupal using mongo db
Vladimir Ilic
 
Is multi-model the future of NoSQL?
Max Neunhöffer
 
Steam Learn: Introduction to NoSQL with MongoDB
inovia
 
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
 
Common MongoDB Use Cases Webinar
MongoDB
 
JSON Data Modeling - July 2018 - Tulsa Techfest
Matthew Groves
 
MongoDB, E-commerce and Transactions
Steven Francia
 
Hybrid MongoDB and RDBMS Applications
Steven Francia
 
Common MongoDB Use Cases
DATAVERSITY
 
mongoDB at Visibiz
Mike Brocious
 
MediaGlu and Mongo DB
Sundar Nathikudi
 
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Ad

More from ArangoDB Database (20)

PPTX
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ArangoDB Database
 
PPTX
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
ArangoDB Database
 
PPTX
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
ArangoDB Database
 
PPTX
ArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB Database
 
PDF
GraphSage vs Pinsage #InsideArangoDB
ArangoDB Database
 
PDF
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
ArangoDB Database
 
PDF
Graph Analytics with ArangoDB
ArangoDB Database
 
PDF
Getting Started with ArangoDB Oasis
ArangoDB Database
 
PDF
Custom Pregel Algorithms in ArangoDB
ArangoDB Database
 
PPTX
Hacktoberfest 2020 - Intro to Knowledge Graphs
ArangoDB Database
 
PDF
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
ArangoDB Database
 
PDF
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
PDF
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoDB Database
 
PDF
ArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB Database
 
PDF
Webinar: What to expect from ArangoDB Oasis
ArangoDB Database
 
PDF
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB Database
 
PDF
3.5 webinar
ArangoDB Database
 
PDF
An introduction to multi-model databases
ArangoDB Database
 
PDF
Running complex data queries in a distributed system
ArangoDB Database
 
PDF
Guacamole Fiesta: What do avocados and databases have in common?
ArangoDB Database
 
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
ArangoDB Database
 
ArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB Database
 
GraphSage vs Pinsage #InsideArangoDB
ArangoDB Database
 
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
ArangoDB Database
 
Graph Analytics with ArangoDB
ArangoDB Database
 
Getting Started with ArangoDB Oasis
ArangoDB Database
 
Custom Pregel Algorithms in ArangoDB
ArangoDB Database
 
Hacktoberfest 2020 - Intro to Knowledge Graphs
ArangoDB Database
 
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
ArangoDB Database
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoDB Database
 
ArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB Database
 
Webinar: What to expect from ArangoDB Oasis
ArangoDB Database
 
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB Database
 
3.5 webinar
ArangoDB Database
 
An introduction to multi-model databases
ArangoDB Database
 
Running complex data queries in a distributed system
ArangoDB Database
 
Guacamole Fiesta: What do avocados and databases have in common?
ArangoDB Database
 

Recently uploaded (20)

PPTX
How to Add Columns and Rows in an R Data Frame
subhashenia
 
PDF
apidays Singapore 2025 - Surviving an interconnected world with API governanc...
apidays
 
PPTX
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
PDF
Technical-Report-GPS_GIS_RS-for-MSF-finalv2.pdf
KPycho
 
PPTX
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
PPTX
01_Nico Vincent_Sailpeak.pptx_AI_Barometer_2025
FinTech Belgium
 
PDF
Business implication of Artificial Intelligence.pdf
VishalChugh12
 
PDF
apidays Singapore 2025 - The API Playbook for AI by Shin Wee Chuang (PAND AI)
apidays
 
PDF
Using AI/ML for Space Biology Research
VICTOR MAESTRE RAMIREZ
 
PPTX
05_Jelle Baats_Tekst.pptx_AI_Barometer_Release_Event
FinTech Belgium
 
PPTX
thid ppt defines the ich guridlens and gives the information about the ICH gu...
shaistabegum14
 
PDF
A GraphRAG approach for Energy Efficiency Q&A
Marco Brambilla
 
PPTX
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
PDF
apidays Singapore 2025 - Building a Federated Future, Alex Szomora (GSMA)
apidays
 
PPTX
BinarySearchTree in datastructures in detail
kichokuttu
 
PDF
apidays Singapore 2025 - Streaming Lakehouse with Kafka, Flink and Iceberg by...
apidays
 
PDF
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
apidays
 
PPTX
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
PPTX
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
PDF
apidays Singapore 2025 - How APIs can make - or break - trust in your AI by S...
apidays
 
How to Add Columns and Rows in an R Data Frame
subhashenia
 
apidays Singapore 2025 - Surviving an interconnected world with API governanc...
apidays
 
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
Technical-Report-GPS_GIS_RS-for-MSF-finalv2.pdf
KPycho
 
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
01_Nico Vincent_Sailpeak.pptx_AI_Barometer_2025
FinTech Belgium
 
Business implication of Artificial Intelligence.pdf
VishalChugh12
 
apidays Singapore 2025 - The API Playbook for AI by Shin Wee Chuang (PAND AI)
apidays
 
Using AI/ML for Space Biology Research
VICTOR MAESTRE RAMIREZ
 
05_Jelle Baats_Tekst.pptx_AI_Barometer_Release_Event
FinTech Belgium
 
thid ppt defines the ich guridlens and gives the information about the ICH gu...
shaistabegum14
 
A GraphRAG approach for Energy Efficiency Q&A
Marco Brambilla
 
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
apidays Singapore 2025 - Building a Federated Future, Alex Szomora (GSMA)
apidays
 
BinarySearchTree in datastructures in detail
kichokuttu
 
apidays Singapore 2025 - Streaming Lakehouse with Kafka, Flink and Iceberg by...
apidays
 
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
apidays
 
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
apidays Singapore 2025 - How APIs can make - or break - trust in your AI by S...
apidays
 

Multi model-databases 29-10-2014 LJC

  • 1. www.arangodb.com Polyglot Persistence & Multi-Model Databases London Java Community 28-10-2014 Michael Hackstein @mchacki
  • 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 ‣ Normally based on key-value stores (each document still 4 NoSQL World Documents - JSON { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } 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 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 ‣ Focussed on m-to-n relations between entities ‣ Stores property graphs: entities and edges can have ‣ Easily query paths of variable length K => V K => V K => V K => V { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } attributes 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“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } ‣ Map value data to unique string keys (identifiers) ‣ Treat data as opaque (data has no schema) ‣ Can implement scaling and partitioning easily
  • 5. An e-commerce system in Relational World 5 Sales-History Shopping-Cart Recommendations Customer Product-Catalog
  • 6. Polyglot Persistence 6 Shopping Cart Product Catalog MongoDB Reporting RDBMS Financial Data RDBMS Recommendations Neo4J Analytics Cassandra Product Catalog Document Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf Riak User activity log Cassandra User Sessions Redis Shopping Cart KeyValue Reporting RDBMS Financial Data RDBMS Recommendations Graph Analytics Column User activity log Column User Sessions KeyValue
  • 7. Single Model Databases 7 Sales-History Recommendations Customer { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } DocumentStore GraphStore DocumentStore { “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”, } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } Shopping-Cart Product-Catalog 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” } KeyValueStore DocumentStore
  • 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 & Overhead ‣Data has to be stored redundantly and has to be kept in sync ‣Several technologies involved ‣Administration effort is huge
  • 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 Financial Data ArangoDB Recommendations ArangoDB 10 User Sessions KeyValue Shopping Cart KeyValue Product Catalog Document Reporting RDBMS Financial Data RDBMS Recommendations Graph Analytics Column User activity log Column Shopping Cart ArangoDB Product Catalog ArangoDB Reporting RDBMS Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf Analytics Cassandra User activity log Cassandra User Sessions ArangoDB
  • 11. Use Case: Multi-Model-Databases 11 Sales-History Recommendations Customer { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } DocumentStore GraphStore DocumentStore { “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”, } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } Shopping-Cart Product-Catalog 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” } KeyValueStore DocumentStore
  • 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 ‣Document Query: FOR user IN users FILTER user.active == true FOR game IN games FILTER game.player == user._id RETURN { username: user.name, score: game.score } ‣ Modify Documents: FOR u IN users FILTER u.status == 'not active' UPDATE u WITH { active: false } IN users ! ‣ Graph Traversal: RETURN GRAPH_TRAVERSAL( "underground_plan", „stations/main_station", "outbound", {minDepth: 2, maxDepth: 5} ) 13
  • 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. Benefits & Overhead ‣ 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
  • 16. Foxx ‣ Add your own customized and versioned REST-API on top of ArangoDB in JavaScript ‣ Include as a web service in Rails, Node.js etc. ‣ Use as storage for Web-frameworks like AngularJS, EmberJS, Backbone etc. ‣ 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 ➡Microservices / (~( ) ) /_/ ( _-----_(@ @) ( / /|/--| V " " " " 16
  • 17. ‣ 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 17 An overview of other features
  • 18. Join our growing community 18 .. working on the geo index, the full text search and many APIs: Ruby, Python, PHP, Java, D, Javascript, ...
  • 19. 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 19