multi-model databases and node.js
TRANSCRIPT
![Page 1: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/1.jpg)
Multi-model databases andnode.js
Max Neunhöffer
BayNode, 19 March 2015
www.arangodb.com
![Page 2: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/2.jpg)
triAGENS(mother company of ArangoDB GmbH)
15 years of experience in building specialized databases
We care about database technology!
In 2012, we wanted to make a generic databasesuch that YOU can build such services.
![Page 3: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/3.jpg)
Document storeA document store stores a set of documents, which usuallymeans JSON data, these sets are called collections. Thedatabase has access to the contents of the documents.
![Page 4: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/4.jpg)
Key/value storeOpaque values, only key lookup without secondary indexes:
=⇒ high performance and perfect scalability
![Page 5: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/5.jpg)
Graph databaseA graph database stores a labelled graph. Vertices andedges can be documents. Graphs are good to modelrelations.
![Page 6: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/6.jpg)
Polyglot Persistence
IdeaUse the right data model for each part of a system.
Take scalability needs into account!
![Page 7: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/7.jpg)
A typical Use Case— an Online Shop
We need to holdcustomer data: usually homogeneous, but still variationsMySQLproduct data: even for a specialised business quiteinhomogeneousshopping carts: need very fast lookup by session keyorder and sales data: relate customers and productsrecommendation engine data: links between different entities
![Page 8: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/8.jpg)
Polyglot Persistence is nice, but . . .
DisadvantagesConsequence:One needs multiple database systems in the persis-tence layer of a single project!
Wouldn’t it be nice, . . .. . . to enjoy the benefits without the disadvantages?
![Page 9: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/9.jpg)
The Multi-Model Approach
Multi-model databaseA multi-model database combines a document store with agraph database and is at the same time a key/value store,with a common query language for all three data models.
Important:is able to compete with specialised products on their turfallows for polyglot persistence using a single database
![Page 10: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/10.jpg)
Use case: Aircraft fleet management
![Page 11: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/11.jpg)
is a multi-model database (document store & graph database),is open source and free (Apache 2 license),offers convenient queries (via HTTP/REST and AQL),including joins between different collections,configurable consistency guarantees using transactionsmemory efficient by shape detection,uses JavaScript throughout (Google’s V8 built into server),API extensible by JS code in the Foxx Microservice Framework,offers many drivers for a wide range of languages,is easy to use with web front end and good documentation,and enjoys good community as well as professional support.
![Page 12: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/12.jpg)
Extensible through JavaScript
The Foxx Microservice FrameworkAllows you to extend the HTTP/REST API by your ownroutes, which you implement in JavaScript running on thedatabase server, with direct access to the C++ DB engine.
![Page 13: Multi-model databases and node.js](https://reader038.vdocument.in/reader038/viewer/2022100508/55a932821a28ab30368b46de/html5/thumbnails/13.jpg)
Links
https://www.arangodb.com
https://github.com/ArangoDB/guesser