# Modeling Patterns

Modeling Patterns: Copying a Few Fields: the Extended Reference Pattern, Keeping Documents Small: the Subset and Computed Patterns, Different Shapes in One…

Updated: November 19, 2026

1. [Copying a Few Fields: the Extended Reference Pattern](https://www.ask-codey.com/lessons/mongodb-extended-reference-pattern) (Journeyman): An order can keep a product's \_id together with a copy of its name and the price paid, so a "my orders" page needs one read and the price stays what the customer paid; copy only a few fields, and decide for each one whether it stays as history or follows the original.
2. [Keeping Documents Small: the Subset and Computed Patterns](https://www.ask-codey.com/lessons/mongodb-subset-and-computed-patterns) (Journeyman): A product page shows its five newest reviews from a short copy kept in the product (the subset pattern), and its average rating from a count and a total that each new review adds to with $inc (the computed pattern), so the page never reads or recounts every review.
3. [Different Shapes in One Collection: the Polymorphic Pattern](https://www.ask-codey.com/lessons/mongodb-polymorphic-pattern) (Journeyman): Bikes, helmets and lights can share one products collection, each with the fields every product has, its own fields, and a type field that says which kind it is, so one query can search them all and another can pick out one kind.

Source: https://www.ask-codey.com/courses/mongodb-in-depth/topics/mongodb-modeling-patterns
