This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
An e-commerce platform stores books, electronics, and clothing in separate collections. A developer needs to build a search page that queries all product types by price and availability. Which schema design pattern should the developer apply?
The computed pattern, precomputing search results for each product type.
The inheritance pattern, storing all product types in a single collection with a type discriminator field.
The subset pattern, embedding a subset of each collection's documents into a search collection.
A product page displays the total review count and average rating. Currently, the application runs an aggregation pipeline against the reviews collection on every page load. With 50,000 page views per day, this approach causes high CPU usage. Which pattern reduces the read-time computation?
The approximation pattern, updating the review count every 100 page views instead of on every view.
The computed pattern, precomputing the review count and average rating during write operations and storing them in the product document.
The extended reference pattern, embedding review data in the product document.
An order confirmation page needs to display the customer's name and the product name for each line item. The full customer profile includes a biography, sign in history, and preferences that the order page never uses. Which pattern should the developer apply?
The extended reference pattern, embedding only the customer's name and product names in the order document alongside their reference ID.
The single collection pattern, storing orders and customer profiles in the same collection.
The schema versioning pattern, adding a version field to track which customer fields the order document includes.
A developer's user profile schema needs to evolve: the address field must change from a single string to a structured object with street, city, state, and zip fields. The collection has 2 million existing documents. Which pattern allows this change without downtime?
The archive pattern, moving old-format documents to an archive collection and inserting new documents with the updated schema.
The outlier pattern, flagging documents that still use the old address format.
The schema versioning pattern, adding a schemaVersion field and migrating documents lazily on read or in batches.
An IoT application receives temperature readings from 100 sensors every 10 seconds. Storing each reading as a separate document creates over 300 million documents per year. Which pattern reduces the document count while preserving access to individual readings?
The approximation pattern, recording only every 100th reading to reduce document volume.
The computed pattern, storing only daily summary statistics instead of individual readings.
The bucket pattern, grouping readings into hourly documents with preaggregated statistics and an array of individual measurements.
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?