Azure NoSQL DocumentDB

Azure DocumentDB is a NoSQL document database-as-a-Service from Microsoft Azure is designed for saving, retrieving and managing each record in an internal structure of fields (semi-structured data, documents or keys). DocumentDB is a schema free JSON document database and also support JavaScript. DocumentDB includes built-in high availability, offers predictable performance and supports elastic scale-out. DocumentDB has some exciting features.

  • Tunable, high performance.
  • Multi document transactions.
  • Query over schema free JSON.
  • Automatic Indexing.
  • Easy to learn query grammar.
  • Low-latency access around the globe.
  • Rich SQL queries over schema-free JSON storage.
  • Server side execution of the Application defined JavaScript as stored procedures and triggers.
  • JavaScript language integration for multi-document transactions.
  • Tunable consistency levels for optimal Application performance.
  • Standard JSON storage with RESTful HTTP interfaces.

     Azure

Let’s understand it by performing something practical on the portal. Enter your credentials and login to Azure portal. Go to New, select Storage and click See All because it seems there is no DocumentDB in Featured Apps.

Azure

Select NoSQL and click it. Here, I need to create Document Account.

Azure

Give a name to your account and select API for it. There are two options for selecting API DocumentDB and MongoDB. I’ll discuss MongoDB in my further articles. All steps are same and are related to the previous articles. Click to create DocumentDB Account.

Azure

Under DocumentDB account, I have to create a Collection. It is a logical container for the physical partitions. A collection is like a container for JSON documents and JavaScript Application logic. Click Add Collection to add a new one.

Azure

For a collection, give a name to your collection and its storage capacity to handle collection is up to 10 TB and set a storage capacity for it. Now, there is a Partition key, which is a JSON property within your documents. Partition key is an element within your document. Give a database name to it and click OK button to create a Collection.

Azure

Thus, my collection is ready now.

Azure

Go to Document Explorer, where we can create and upload our documents under our Collection.

Azure

Click Create and you will see a JSON format script with ID and People (partion). You can upload JSON script as well. I’ve given an Id and some data in People Partition. Click Save to save this script.

Azure

Now, go to Query Explorer and run a query.

Azure

The query will be executed successfully and produces the expected result.

Azure


Similar Articles
IotCoast2Coast
Improving the World of Tomorrow :- We offer application development and support services.