Introduction to Azure DocumentDB


DocumentDB is the Microsoft’s newest NoSQL document database platform that runs on Microsoft Azure. NoSQL really means non relational in fact there are different types of databases of NoSQL databases, this includes key-value stores , column stores , graph database, document database. NoSQL database does not have any schema. Every item in the database is free to store information , it would not depends on the other items in the database .

Relational Database Document Database
rows documents
Columns Properties
Strongly typed Schemas Schema-free
highly normalized Typically denormalized
Rich , Robust , Mature , Complex Lean and simple

In DocumentDB we actually use SQL for querying the document, for .NET we have LINQ provider to do the same. All the properties in all documents are indexed automatically however we can tune this. We can use REST/HTTP to interact with documentDB. Currently we have SDKs for .NET , Node.js , JavaScript , Java , Python.

Creating a DocumentDB

Before creating a DocumentDB i assume you have Microsoft account and Azure subscription .
Go to

Click on new -> Data + Storage -> Azure DocumentDB


Click on Azure DocumentDB, there you need to enter a unique id , Account tier , Subscription , Resource Group and Location then click on create button.


It will take few minutes to create.


Create a database with a name. Here MyDocDb



Notice that it has no collections yet which are the container to store Json files. Everything in a DocumentDB is a resource. Every resource has two Ids, one is called simply id and another one is resource id.

Open the database you can see there is no collection .


Add one collection on the db. You can select Pricing Tier , Indexing Policy there



Click on create document, then you can enter the document in Json format




The following two tabs change content below.

Tom Mohan

Tom Mohan is a technologist who loves to code and build. He enjoys working on Microsoft Technologies. Tom specializes in ASP.NET MVC, Web API , Azure, C# ,WPF, SQL etc and holds a Bachelor engineering degree in Computer Science. Certification : MCSD , MCTS

Latest posts by Tom Mohan (see all)