Deploy and Query Azure Cosmos DB with the NoSQL API
Create a serverless Cosmos DB account, build a database and container, insert and query documents, and explore consistency levels in this hands-on lab.
Lab Overview & Objectives
Azure Cosmos DB is Microsoft's globally distributed, multi-model database service built for mission-critical workloads. Its NoSQL API lets you query JSON documents using familiar SQL-like syntax while delivering single-digit-millisecond latency and five tunable consistency levels — a combination no other managed database offers.
In this lab, you will deploy a Cosmos DB account in serverless mode, create a database and container with a thoughtful partition key, insert JSON documents, and write queries to filter, project, and sort your data. You will also configure indexing policies and explore the five consistency levels that make Cosmos DB unique. Each step frames a real architecture decision — not just a click-through — so you leave with the knowledge to design Cosmos DB solutions for production workloads.
Objectives
Upon completing this Intermediate level lab, you will be able to:
- Create an Azure Cosmos DB account using the serverless capacity mode with the NoSQL API
- Build a database and container with a well-designed partition key strategy
- Insert JSON documents into a container using the Azure Portal Data Explorer
- Write SQL-like queries to filter, project, and sort NoSQL documents
- Configure an indexing policy to include and exclude specific document paths
- Compare the five consistency levels and understand their trade-offs in a distributed system
Who is this lab for?
This lab is designed for:
- Cloud engineers and developers learning Azure's flagship NoSQL database and wanting hands-on experience with Cosmos DB
- Solutions architects evaluating Cosmos DB's consistency models and cost optimization strategies
- Database administrators transitioning from relational databases to NoSQL and looking for a structured introduction
Real-Time Validation
Our platform uses an automated validation engine to verify your configurations as you work through the lab modules. No multiple choice—just real-world proficiency.