📜 ⬆️ ⬇️

DocumentDB: Microsoft's NoSQL database

Albeit with some delay compared with other companies, but Microsoft made the necessary and released its own non-relational database: it is called DocumentDB . And let this proprietary system, which is tied to the Azure service, it does not make the news less significant.

DocumentDB automatically indexes the contents of all documents, allows processing requests in real time, fully supports ACID requirements for transactions (atomicity, consistency, isolation, reliability). The system is very similar to MongoDB as an efficient repository of JSON documents with rich APIs for requests, while at the same time it differs favorably from MongoDB in scalability and reliability, deep JavaScript integration, support for RESTful API, asynchronous requests, etc.


')
Like MongoDB, DocumentDB is a hierarchy of databases, collections, and documents.

Queries on the SQL-like syntax in DocumentDB are processed as is, without the need to select indices.

Here are the SQL-like queries in DocumentDB.

SELECT * FROM teams T WHERE T.city = 'Melbourne' 

 SELECT T FROM teams T JOIN person IN T.members WHERE person.age >= 18 

 SELECT ApplySalesTax(item, 'Australia') FROM item in cart.items 

DocumentDB executes JavaScript scripts within the database. Various stored in the database procedures, functions and triggers can be written in JavaScript (scripts are in collections for later execution). All JavaScript logic is executed as part of guaranteed ACID reliability with snapshot isolation. At runtime, if the script throws an exception, the entire transaction is canceled.

Client libraries for working with DocumentDB storage:


The cost of using DocumentDB in the Azure cloud is measured in units (capacity units) and starts at $ 22.50 per unit (including a 50% discount on the trial period). One unit is 10 GB of space on an SSD disk, 2000 read operations per second, 500 operations per second insert / replace / delete, 1000 requests per second to the collection with the return of one document.

Source: https://habr.com/ru/post/234233/


All Articles