Get In Touch With Document DB From Azure Cosmos DB

Introduction

As we are all excited about the new features that Microsoft has come up with at Build 2017, here is the one wrapped up with the database world on Azure. Here, in this writing, I will be sharing a few pieces of my work on Azure Cosmos DB.

What is cosmos DB?

Microsoft has come up with a new source of help for developers who are working on the database stream with a combination of globally distributed, multi-model environments which will help us to create a document, query it, work with graph databases, and add key and values towards it. Cosmos DB helps us in distribution and scaling across various data center regions and it helps our clients in surviving with the nearest data center region to theirs.

Let's start working on Azure Cosmos DB.

Requirements

  1. Azure subscription

Note. You can get a free Azure subscription for one month by clicking here.

Steps to be followed


Login to the Azure portal

Login to your Azure portal account using the below link.

Link – www.portal.azure.com

Create Azure cosmos DB

Click on New - Databases - Azure Cosmos DB.

New database 1-

Now, here in this blade, you have to fill in your ID for Cosmos DB along with API, Subscription, Resource Group, and Location details.

So, as said earlier, your Cosmos DB is a multi-model database service which is the reason why we specify what API and data model we are going to use here. We have multiple features in Cosmos DB that Azure supports, such as Gremlin (graph), Mongo DB, Document DB, and Table. Let's work with Document DB over here.

Now, let's add a few points to understand what document DB is

This Document DB is a wrapper of a NO-SQL database and it helps in storing, accessing, and managing the data which are in semi-structured format. The main operations that we perform at Document DB are CRUD (Create, Retrieve, Update, and Delete), Key IDs, Editing and accessing the database, Getting in touch with search engines, and using Azure Search in DocumentDB, etc.

  • Give ID
  • API: Document DB
  • Subscription: Select the subscription that you have
  • Resource Group (which you use for pooling your services): name your Resource Group with some name that you can use for tagging into other services.
  • Location: the location of your data center where you want to host this Cosmos DB.

Click on "Create".

Create-2-

Understand document DB

Now, your Cosmos DB – Document DB gets deployed on your Azure account.

Dashboard-3-

Deployment completion

Once the deployment is completed, you can find multi-platform ways for which Azure Cosmos DB supports you with a free hands-on Azure Document DB. You have multiple platforms here, such as .NET, .NET Core, Xamarin, Java, Node.js, and Python. You can also create a sample basic application using the same over here.

Quick start-4-

And now, the rest are just similar to what you worked on with your Document DB before. You can add collections, you can work on queries with the help of your Query Explorer, explore with Document Explorer, etc.

Helpful links

Check this link to work with DocumentDB at the full sketch.

Stay tuned for more writings of mine to learn about the new updates of Microsoft Azure Portal.


Similar Articles