DocumentDB: Microsoft's NoSQL Database

    Although somewhat late compared to other companies, Microsoft did the necessary and released its own non-relational database: it is called DocumentDB . And even if it is a proprietary system that is tied to the Azure service, this does not make the news less significant.

    DocumentDB automatically indexes the contents of all documents, allows real-time processing of requests, fully supports ACID requirements for transactions (atomicity, consistency, isolation, reliability). The system is very similar to MongoDB as an effective repository of JSON documents with rich request APIs, while at the same time it compares favorably with 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 SQL-like syntax in DocumentDB are processed as is, without having to select indexes.

    This is what SQL-like queries look like in DocumentDB.

    SELECT * 
    FROM teams T 
    WHERE = 'Melbourne'

    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 inside the database. Various procedures, functions and triggers stored in the database can be written in JavaScript (scripts are in the collections for later execution). All JavaScript logic is executed within the framework of guaranteed ACID reliability with isolation of snapshots. At run time, if the script throws an exception, the entire transaction is canceled.

    Client libraries for working with DocumentDB repository:

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

    Also popular now: