OverviewPracticeGlossary

Practice

Pick what to practice and how — your progress is saved as you go.

These are the questions on the free pages, and a free account lets you practice them. The full book has 624 more.

  • Part 1: Throughput, Consistency, SDK Operations, Queries, Partitioning and Change Feed 10 of 11 pages
  • Part 2: Security, Backup, Multi-Region Failover, Indexing, Monitoring and Fleets 8 pages
  • Part 3: Full-Text, Vector and Hybrid Search, RAG, Agent Memory and Fabric Analytics 5 pages

Missed questions

0 questions you last got wrong

Saved for later

0 questions you saved while practicing

What do you want to practice?

These are the questions on the free pages. Test yourself below, and tick the pages to include in a practice session.

Filter
    • Designers ask for the ceiling that applies to each physical shard for throughput and to each logical shard for capacity.

      1. The cap per physical partition is ____ RU/s and the cap per logical partition is ____ of storage.
      • 10 GB
      • 10,000
      • 20 GB
      • 400
      • 5,000
      • 50 GB
      • Unlimited
      Show answer
      • The cap per physical partition is 10,000 RU/s and the cap per logical partition is 20 GB of storage.

      In account1 you create a container partitioned on CompanyID with a composite unique key on UserName and EmailAddress, then plan to load the rows below.

      CompanyIDUserNameEmailAddress
      Company1user1user1@contoso.com
      Company1user1USER1@contoso.com
      Company1user2user2@outlook.com
      Company2user1user1@litwareinc.com
      Company2user2user2@outlook.com
      2. How many unique-key conflicts will the load produce?
      • 0
      • 1
      • 2
      • 3
      Show answer and explanation
      • 0

      Uniqueness is enforced only inside each logical partition and comparisons are case sensitive. The two Company1 user1 rows differ in email case so they are distinct, and the Company2 row that duplicates a Company1 email sits in a different CompanyID partition, so no violation occurs.

      A Contacts container uses automatic indexing, partition path /companyID, and a unique combination on /familyName plus /givenNames. Two records already exist.

      companyIDfamilyNamegivenNamesemailAddress
      1RogersTerry Johnterryj@contoso.com
      1Rogersnullrogers@contoso.com

      Three further records are candidates for insertion.

      ItemcompanyIDfamilyNamegivenNamesemailAddress
      11Rogersterry johnterryj@contoso.com
      21Rogersnullrogers2@contoso.com
      32RogersTerry Johnterryj@contoso.com
      3. The first candidate record can be added.
      • True
      • False
      Show answer and explanation
      • True

      Uniqueness is checked per companyID and comparisons are case-sensitive, so lower-case terry john does not duplicate Terry John.

      4. The second candidate record can be added.
      • True
      • False
      Show answer and explanation
      • False

      Null participates in the constraint. Company 1 already holds Rogers with null, so a second identical combination is rejected.

      5. The third candidate record can be added.
      • True
      • False
      Show answer and explanation
      • True

      Checks apply only inside one logical partition. Company 2 is a different partition, so its identical name pair is allowed.

      A new container will hold employee records for 5,000 small firms. Every firm has at most 25 staff and every staff item carries an emailAddress. The address must be distinct for staff who belong to the same firm.

      6. Choose ____ as the partition key and ____ as the unique key so the rule is enforced.
      • companyId
      • companyId+emailAddress
      • emailAddress
      • employeeId
      Show answer
      • Choose companyId as the partition key and emailAddress as the unique key so the rule is enforced.
      7. A product container was created with partition key path /categoryId but the team later needs /sku. What must happen to change the partition key?
      • The container is deleted automatically and throughput is refunded with no further action
      • The key path updates in place and existing items are rehashed with no downtime or copy
      • A new container with the new key path must be created and data copied into it
      • The database name must change and all SDKs must switch APIs
      Show answer and explanation
      • A new container with the new key path must be created and data copied into it

      The partition key path fixes how items group and scale, and it cannot be altered in place, so a new container and data copy are required.

      8. The API selected when an Azure Cosmos DB account is created is fixed for the life of the account and cannot be changed later.
      • True
      • False
      Show answer and explanation
      • True

      The API is fixed for the life of the account, so NoSQL must be selected at creation for workloads built on this course.

      9. A NoSQL query always runs against exactly one ____, and the name product in FROM product p is only an ____ for that container’s items inside the query.

      Query scope

      • alias
      • container
      • database
      • index
      • region
      Show answer
      • A NoSQL query always runs against exactly one container, and the name product in FROM product p is only an alias for that container’s items inside the query.
      10. An online shop wants to fetch an order directly using its known order number instead of searching first. Which item property should hold that order number to allow a point read by ID and partition key?
      Show answer and explanation
      • id

      Supplying a known string id, such as an order number, enables a later point read by ID and partition key without querying first.

      11. A point read of a 1-KB item by ID and partition key costs ____ RU, and provisioned throughput is measured in ____.

      Throughput basics

      • 1
      • 10
      • GB
      • ms
      • RU/s
      Show answer
      • A point read of a 1-KB item by ID and partition key costs 1 RU, and provisioned throughput is measured in RU/s.
      12. An orders container is partitioned by customer ID. Why is a query filtered to one customer ID typically cheaper than the same query with no customer filter?
      • Because cross-partition queries bypass indexes while single-partition queries use them
      • Because a scoped query reaches one logical partition while an unscoped query may fan out to every physical partition
      • Because physical partitions can only be read when the partition key is omitted
      • Because logical partitions are never stored on physical partitions
      Show answer and explanation
      • Because a scoped query reaches one logical partition while an unscoped query may fan out to every physical partition

      A filter on the partition key value isolates work to one logical partition, while an unfiltered query may need to contact every physical partition and coordinate the results.

      13. Each logical partition in Azure Cosmos DB for NoSQL holds up to 20 GB, while each physical partition provides up to 10,000 RU/s and 50 GB of storage.
      • True
      • False
      Show answer and explanation
      • True

      The documented caps are 20 GB per logical partition and up to 10,000 RU/s plus 50 GB per physical partition.

      14. A retail app serves shoppers on three continents from one Cosmos DB account. What distinguishes single-region writes from multi-region writes for that account?
      • Single-region writes replicate to no other regions while multi-region writes replicate to one region only
      • Single-region writes require redeployment to add a region while multi-region writes add regions offline
      • Single-region writes accept writes in one region and reads in many, while multi-region writes accept writes in any added region
      • Single-region writes enforce strong consistency while multi-region writes enforce eventual consistency
      Show answer and explanation
      • Single-region writes accept writes in one region and reads in many, while multi-region writes accept writes in any added region

      Single-region writes centralize writes in one region while reads can come from many regions; multi-region writes allow any added region to accept writes as well.

      15. A global catalog stores each product as a self-contained JSON document. Why does this approach simplify adding a new product attribute?
      • Every container must be rebuilt because all items share one fixed table definition
      • New attributes can appear on some items without migrating the whole dataset
      • Queries stop working until a secondary index is declared for the new field
      • All writes must pause while regions are reprovisioned for the new shape
      Show answer and explanation
      • New attributes can appear on some items without migrating the whole dataset

      Self-contained JSON items carry their own structure, so adding a field to some products does not force a migration or force every other item to share the shape.

      16. Azure Cosmos DB for NoSQL requires developers to declare a schema before writing data and to create secondary indexes before any query can run.
      • True
      • False
      Show answer and explanation
      • False

      Azure Cosmos DB for NoSQL is schema-agnostic and indexes all properties by default, so data is queryable right after it is written with no schema declaration or manual secondary indexes.

      17. Match each NoSQL data model to the layout it describes.
      • Single key mapped to a value
      • Several self-contained JSON documents
      • Multiple columns organized in a family
      • Network of nodes connected by edges
      • Column-family
      • Document
      • Graph
      • Key-value
      Show answer and explanation
      • Single key mapped to a value: Key-value
      • Several self-contained JSON documents: Document
      • Multiple columns organized in a family: Column-family
      • Network of nodes connected by edges: Graph

      A key-value store maps one key to one value.

      A document store keeps independent JSON entities that can differ in shape.

      A column-family store groups columns inside families.

      A graph store models entities as nodes joined by edges.

      18. Which workload description shows the strongest fit for Azure Cosmos DB for NoSQL based on fit signals?
      • Varied product shapes, sharp sale spikes, shoppers on multiple continents, and strict uptime goals
      • Fixed small dataset, single office, steady traffic, and no schema changes with current system meeting goals
      • Nightly full-table scans and historical reporting as the dominant pattern with no operational needs
      • Frequent multi-entity foreign-key enforcement and broad joins across independently managed records
      Show answer and explanation
      • Varied product shapes, sharp sale spikes, shoppers on multiple continents, and strict uptime goals

      Evolving shapes, sharp traffic swings, global low-latency needs, and strict resiliency reward flexible schema, elastic RU/s, and worldwide replication.

      19. Match each AI application role for Cosmos DB to what it provides.
      • Database of record for users, orders, and content
      • Fresh content retrieved to ground responses
      • Durable state and history across agent turns
      • Agent memory
      • Operational store
      • Retrieval and grounding data
      Show answer and explanation
      • Database of record for users, orders, and content: Operational store
      • Fresh content retrieved to ground responses: Retrieval and grounding data
      • Durable state and history across agent turns: Agent memory

      The operational store is the database of record for users, orders, and content.

      Retrieval and grounding supplies current content to ground AI answers.

      Agent memory preserves durable state and history across interactions.

      20. A workload dominated by repeated full-dataset scans, complex aggregations, and ad hoc historical reporting is better served by an analytical platform than by a transactional store alone.
      • True
      • False
      Show answer and explanation
      • True

      Full scans, complex aggregations, broad joins, and ad hoc history are analytical patterns; an analytical platform fits better as primary store or as a complement.

      21. Order Azure Cosmos DB for NoSQL resources from the broadest scope to the most granular item.
      • Account
      • Container
      • Database
      • Item
      Show answer
      1. Account
      2. Database
      3. Container
      4. Item
      22. An app has several containers and wants dedicated performance for one busy container while sharing a pool across three quiet ones. Where can throughput be provisioned to support both patterns?
      • Only on an item, because each JSON document has its own isolated throughput
      • Only on an account, because throughput cannot be scoped below the account
      • Usually on a container, with the option to share throughput from the parent database
      • Only on a physical partition, which developers provision directly
      Show answer and explanation
      • Usually on a container, with the option to share throughput from the parent database

      Throughput is normally set on a container, which is the scale unit, but a database can share a throughput pool across the containers it holds.

      23. A write to a single JSON item in Azure Cosmos DB for NoSQL is atomic, so the item is never left partially written.
      • True
      • False
      Show answer and explanation
      • True

      A single-item write in Azure Cosmos DB for NoSQL is atomic, so the document is stored completely or not at all and is never left half-written.

In what order?

In orderShuffledMissed first