Article Overview

  1. Background

    1. Azure Cosmos DB

    2. Azure Cosmos DB Items

  2. Create Azure Cosmos DB account

  3. Add Database and Container

  4. Add Data in Database

  5. Clean up resources

  6. Summary

This article describes a complete process of how to manage various tasks on an Azure Cosmos DB account through Azure portal. Azure Cosmos DB can also be managed by using Azure CLI, Azure PowerShell, Azure Resource Manager templates, Bicep, or Terraform. This article describes following activities one by one by using Azure Portal:

1. Background

1.1. Azure Cosmos DB

It is fully managed and globally distributed NoSQL database service. It is specially designed for applications which requires high availability and low latency. It also provides elastic scalability across the multiple regions. It supports following four data models:

Following figure shows hierarchical representation of Azure Cosmos DB account entities.

Azure Cosmos DB account entities

1.2. Azure Cosmos DB Items

Below table shows the supported Azure Cosmos DB entities and items.

NoAzure Cosmos DB entityAzure Cosmos DB item
1NoSQL APIItem
2Cassandra APIRow
3MongoDB APIDocument
4Gremlin APINode or edge
5Table APIItem

2 Create Azure Cosmos DB account

Let’s create and manage Azure Cosmos DB account using Azure Portal. Azure Cosmos DB can also be managed by using Azure CLI, Azure PowerShell, Azure Resource Manager templates, Bicep, or Terraform. Perform following steps one by one in to Azure Portal to achieve this.

Now, new created Azure Cosmos DB account is ready to use for next process.

3 Add Database and Container

Once an Azure Cosmos DB account is ready next step is to create a database and a container. Perform following steps one by one in to Azure Portal to achieve this.

Now, database and container is ready for next process to data add and retrieve.

4 Add Data in Database

Let’s use Data Explorer to add data into created database. Perform following steps one by one in to Azure Portal to achieve this.

{
    "id": "1",
    "category": "computer",
    "name": "desktop",
    "description": "HP All-in-One Desktop PC",
    "isComplete": false
}

Now, it’s done as data is added in database.

5. Clean up resources

Once finished the exercise it’s recommended to delete cloud resources are being created to avoid the unnecessary resource usage and any future costs. Deleting a resource group will delete all resources contained within it. Perform following steps one by one in to Azure Portal to achieve this.

6. Summary

Here, a complete process flow is described to manage various tasks on an Azure Cosmos DB account by using the Azure portal. First a Azure Cosmos DB account is created. After that added a database and a container. Later on data is added to the database. At the end resources are being cleaned up.