Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Design data models for access patterns and operational requirements

A worked example

Multiple answers

A Contoso catalog uses two containers. The product container holds product items that store a categoryId and a tagIds array. The productMeta container holds category and tag items, which the merchandising team edits and which must remain the source of truth for category and tag names. The category browsing page is the busiest operation; it lists each product's name, price, category name, and tag names.

Requirements:

  • The category page must be served by one query against one container.
  • After a category or tag is renamed, products may show the old name for a short time.
  • Categories and tags are renamed but never deleted.
  • The account does not use continuous backup, and this must not change.

Which two actions should you include in the data model design? Each correct answer presents part of the solution. Select two.

Choose 2 answers.
Why

Copying the category name and tag names onto each product turns the multi-lookup category page into one query against one container, which the busiest operation needs. The copies create a synchronization obligation, so a change feed listener on productMeta rewrites them when a name changes, and brief staleness is acceptable here. Because renames are updates and nothing is deleted, the default latest-version mode is sufficient. All-versions-and-deletes mode would require continuous backup, which the scenario forbids.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free