10/183 questions · Unlock full access
Q1

A financial services company is using Azure Cosmos DB for NoSQL to store transaction data. The container is partitioned by `/transactionId`. During a performance audit, you observe that queries filtering on `/transactionDate` are consuming a high number of RUs and are identified as cross-partition queries. The development team wants to add a composite index to improve performance for queries that filter by both `/transactionDate` and `/transactionType`. The current indexing policy is the default. What is the most likely outcome of adding a composite index for (`/transactionDate`, `/transactionType`)?

Q2

You are designing a multi-tenant SaaS application on Azure Cosmos DB for NoSQL. Each tenant's data must be logically isolated. The application has a high volume of small, frequent writes and reads. To optimize costs, you provision throughput at the database level and use a shared container for all tenants. You choose `/tenantId` as the partition key. A new requirement mandates that within each tenant's data, all user profiles must have a unique `emailAddress`. How should you enforce this new uniqueness constraint?

Q3

A global e-commerce platform uses Azure Cosmos DB for NoSQL with multi-region writes enabled to reduce latency for a worldwide user base. The consistency level is set to Session. To handle concurrent updates to a user's shopping cart, a custom conflict resolution policy has been implemented using a merge stored procedure. The policy is designed to merge the items from conflicting writes. During a sales event, users in Europe report that items they add to their cart are occasionally disappearing. Users in North America do not report this issue. The primary write region is North America. What is the most probable cause of this issue?

Q4Multiple answers

You are building an event-sourcing solution where all changes to application state are captured as a sequence of events. You use Azure Cosmos DB for NoSQL and an Azure Function with a Cosmos DB trigger to process these events. The function archives events to cold storage and updates several materialized views in other containers. During testing, you notice that if the Azure Function fails while processing a batch of changes, it re-processes the same batch again upon restart, leading to duplicate data in the materialized views. Which two actions should you take to make the function idempotent and prevent data duplication? (Select TWO)

Q5

You are managing a large Azure Cosmos DB for NoSQL container that stores user session data. The container is configured with the default indexing policy (automatic indexing of all properties). You identify that a specific property, `sessionTrace`, contains large JSON blobs used only for debugging and is never queried. To reduce storage costs and improve write performance, you decide to exclude this property from indexing. Which JSON snippet represents the correct indexing policy to achieve this?

Q6

A DevOps engineer is tasked with automating the deployment of an Azure Cosmos DB for NoSQL account using Azure Resource Manager (ARM) templates. The requirement is to configure the account with two regions: 'East US' as the primary write region and 'West US' as a read region. The deployment must also specify the automatic failover policy with 'West US' having a failover priority of 1. Which property within the `Microsoft.DocumentDB/databaseAccounts` resource in the ARM template should be configured to define the regions and failover priorities?

Q7

True or False: When using the Azure Cosmos DB for NoSQL SDK and performing a transactional batch operation, all operations within the batch must target documents that reside within the same logical partition.

Q8

You are monitoring an Azure Cosmos DB for NoSQL account using Azure Monitor. You notice that the 'Max RU/s Per Partition' metric shows one partition consistently at 10,000 RU/s, while other partitions are below 1,000 RU/s. The container is configured with autoscale throughput up to 40,000 RU/s. Despite having ample overall throughput, the application is experiencing throttling (HTTP 429 errors). What is this condition called and what is the primary solution? ```mermaid graph TD subgraph "RU Consumption per Physical Partition" P1["Partition 1: 10,000 RU/s"] -->|Throttling| App{Application} P2["Partition 2: 800 RU/s"] --> App P3["Partition 3: 500 RU/s"] --> App P4["Partition 4: 950 RU/s"] --> App end style P1 fill:#f77,stroke:#333,stroke-width:2px ```

Q9

A developer needs to implement a point-in-time restore for a critical Azure Cosmos DB for NoSQL account. The requirement is to be able to restore the account to any state within the last 15 days with a granularity of one second. The account currently has periodic backup configured with a 4-hour interval and 2 copies retained. What is the first and most critical step the developer must take to meet the new requirement?

Q10

You need to implement security for an Azure Cosmos DB for NoSQL account to ensure that developers on your team can only manage database and container settings (control plane operations) but cannot read or write data (data plane operations). The developers must be able to perform their tasks through the Azure portal. Which Azure role should you assign to the developers at the Cosmos DB account scope?