Design and develop database solutions
Every item has an address, and the partition key is half of it
container.ReadItemAsync<Product>("68719518388", new PartitionKey("gear-surf-surfboards")) is the .NET SDK call that fetches one item from a container (the unit inside a database that holds items) by its address: the item's id plus its partition-key value, the value at the container's partition key path. "Address" is this guide's shorthand, not an Azure Cosmos DB term. Every SDK passes the same pair, because the service needs both for a point read, the most efficient kind of read. The address runs through this domain: items sharing a partition-key value form a logical partition, the scope of every multi-item transaction, and Azure Cosmos DB for NoSQL spreads logical partitions over physical partitions (the service-managed units that store and serve the data). Throughput provisioned on the container itself, called dedicated throughput, divides evenly between its physical partitions; throughput is the work reserved per second, in request units per second (RU/s), where a request unit measures the work an operation does. The partition key therefore decides whether a point read is possible, whether the throughput is used evenly, and which writes can commit together. The trap is a relational habit: a JOIN in a query works only inside one item, and no transaction spans two partition-key values, so data read or written together belongs in one item or under one partition-key value.
The domain unfolds in five questions, one per subtopic
Design and develop database solutions carries 40–45% of the exam, the largest of its three domains; the header's 42.5% is that range's midpoint. Each of its five subtopics answers one developer question about a container. Evaluate resource models and SDK solutions answers where does a setting live, and what does it cost?: which scope (account, database, container, client or single request) owns a setting such as the default consistency level (the account's read guarantee, which all reads and queries use by default; the traditional ConsistencyLevel override lets a client or a single request relax it but never strengthen it, while the preview ReadConsistencyStrategy, available only when the client connects in Direct mode (not Gateway mode) in the .NET (3.46+) and Java (4.69+) SDKs, can also choose a stronger read), how much throughput to provision in request units (RUs), and how CosmosClient, the SDK object for one account, connects. Implement database operations answers which operation reaches the item?: a point read or a paged query, a single-item write, a transactional batch (writes that commit or fail together) versus bulk execution (many independent writes sent for throughput), expiry through time to live (TTL), and the ETag (the item's server-generated version tag) check that stops one writer silently overwriting another. Design and implement data models and partitioning strategies answers what item shape and partition key fit the workload?: embedding related data in one item or referencing it as separate items, choosing among four partitioning strategies, and estimating cost. Implement change feed answers who reacts when an item changes?: the change feed is a container's persistent record of item changes that several applications can read at once. In its push model a library, not the database, does the pushing: the change feed processor polls the feed, keeps its progress in a lease container and hands each batch to your code; in the pull model your code requests each batch itself. Container copy jobs reuse the feed to copy data into a new container. Design and implement Azure Cosmos DB solutions by using AI-assisted tools answers guidance or live data for an AI assistant?: the Azure Cosmos DB Agent Kit (Agent Kit) gives a coding assistant best-practice rules and executes nothing, while the Azure Cosmos DB MCP Toolkit (MCP Toolkit) lets an AI agent read the live account through the Model Context Protocol (MCP). The decision tree asks the last four questions in reverse order, and a scenario that answers no to all four belongs to the first.
Get the permanent choices right first, then take the narrowest tool
When two answers both work, start by asking which choices are fixed once the container exists: its partition key path, its unique key policy (the property paths whose values must be unique within each logical partition), and whether it has dedicated throughput or shares throughput provisioned on its database. Changing any of them means creating a new container and copying the data, which is what container copy jobs (in preview) carry out, while the amount of provisioned throughput and the default consistency level change in place; so the answer that gets the permanent choices right for the main access pattern usually wins. At run time the same instinct favors the narrowest tool: a point read rather than a query when the id and partition-key value are known, a query whose equality filter on the partition key routes it to the physical partition that holds that value rather than one that fans out across all physical partitions, and a transaction kept inside one partition-key value.
The five developer questions, and where the partition key shows up in each
| Question | What it decides | Where the partition key shows up | Drill into |
|---|---|---|---|
| Where does a setting live, and what does it cost? | The scope that owns each setting, the default consistency level, how much throughput to provision, and how CosmosClient connects | The partition key path is fixed when the container is created, and a container's dedicated throughput divides evenly across its physical partitions | Evaluate resource models and SDK solutions |
| Which operation reaches the item? | Point read or paged query, the single-item write, transactional batch or bulk execution, TTL, and the ETag check | A point read needs the item's id and the partition-key value; a transactional batch stays within one partition-key value | Implement database operations |
| What item shape and partition key fit the workload? | Embedding or referencing, the partitioning strategy, and the cost estimate | The key must spread storage and requests evenly and match the most common equality filters | Design and implement data models and partitioning strategies |
| Who reacts when an item changes? | Push or pull consumption of the change feed, the lease container, and container copy jobs | Changes arrive in order within one partition-key value, with no guaranteed order across values | Implement change feed |
| Guidance or live data for an AI assistant? | Agent Kit best-practice rules, or MCP Toolkit tools that read the live account | The Agent Kit gives its Partition Key Design rule category Critical priority, as it does Data Modeling | Design and implement Azure Cosmos DB solutions by using AI-assisted tools |