Correct Answer: Use the Cosmos DB Patch API to perform partial document updates (add/replace/remove) natively on the database server.
The Cosmos DB Patch API enables partial document updates. Instead of downloading the document, modifying it in application memory, and uploading it back (which consumes substantial...
Correct Answer
Use the Cosmos DB Patch API to perform partial document updates (add/replace/remove) natively on the database server.
Why This Answer Is Correct
The Cosmos DB Patch API enables partial document updates. Instead of downloading the document, modifying it in application memory, and uploading it back (which consumes substantial RU/s and increases network latency), the Patch API applies changes (like adding an item to an array or incrementing a counter) directly on the partition server in a single, highly efficient operation.
This question evaluates your knowledge of Azure Cosmos DB โ a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Cosmos DB is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
You are designing a multi-tenant SaaS application using Azure Cosmos DB for NoSQL. Each tenant's data must be logically isolated and queries should never cross tenant boundaries. Query performance must be predictable. How should you partition the container?
Your application reads Azure Cosmos DB data globally across three regions. The marketing team needs data to eventually be the same across all regions, and can tolerate reading slightly stale data (up to 5 minutes old) in exchange for lower latency reads. Which consistency level should you configure?
You are designing a multi-tenant SaaS application where each tenant's data must be isolated and queries must be highly efficient for per-tenant reads. The application will have thousands of tenants. Which Cosmos DB partition key design is most appropriate?
You are building a microservices architecture. You need a data sync solution where changes to documents in your primary Azure Cosmos DB database automatically trigger a downstream search index service to update its records in real-time. Which Cosmos DB feature allows you to listen for changes without polling the database?