MongoDB Data Modeler Associate study materials
MongoDB Data Modeler Associate study resources

MongoDB Data Modeler Associate flashcards

MongoDB Data Modeler Associate · Build recall with a focused review session.

31 cards. Read the term and the definition here. The deck at the top of this page is optional.

Embedding decision rule
Embed when the child data is read with the parent, is bounded in size, and does not change independently. Referencing is preferred when the child is unbounded or shared across many parents.
16 MB document limit
A single BSON document cannot exceed 16 MB. Arrays that grow per event risk this limit, so designers bucket, cap, or move them to a child collection.
Unbounded array anti-pattern
Storing an ever-growing array inside one document, such as all log lines or comments. It causes document growth, larger indexes, and eventual size-limit failures.
Access-pattern-driven modeling
Enumerating every read and write with its frequency and result size before choosing a schema. The workload, not abstract normalization, determines embed versus reference.
Schema version field
An integer field stored on each document recording its shape version. It enables lazy migration on read and lets old and new documents coexist during deployment.
Denormalization trade-off
Duplicating a field avoids joins on read but requires updating every copy on write. It pays off when reads greatly outnumber writes and slight staleness is acceptable.
$lookup cost
A $lookup performs an index or collection lookup per input document on the foreign side. It works but is slower than embedded data for high-frequency read paths.
One-to-one relationship
A relationship where each entity pairs with exactly one other, such as user and profile. It is usually modeled as an embedded subdocument in the same document.
Bucket pattern
Grouping many small events into one document, for example 200 readings per hour. It reduces document count, index size, and index traversal for time-series data.
Outlier pattern
Handling rare documents that exceed normal bounds by flagging them and moving overflow data to a companion collection, keeping the common path simple.
Subset pattern
Storing only the most frequently accessed elements inline, such as the 10 latest reviews, while the full set lives in another collection. It shrinks the working set.
Extended reference pattern
Embedding only the fields of a referenced document that queries need, like name and price, instead of the whole document, reducing duplication and join frequency.
Computed pattern
Storing precomputed derived values such as totals or average ratings so reads avoid aggregation. The value is refreshed on write or on a schedule.
Attribute pattern
Moving a set of varying fields into an array of key/value pairs so a single index covers queries on any of those keys.
Polymorphic pattern
Storing documents of different shapes in one collection, distinguished by a type field. Queries filter on that field and indexes include it as a prefix.
Schema versioning pattern
Pairing a version field with migration logic executed on read, so data shape changes ship with code without a blocking full-collection rewrite.
Parent references pattern
Storing an array of ancestor identifiers on each document so subtree queries become a single indexed lookup on that array.
Atomic single-document write
MongoDB guarantees atomicity for operations on one document. Embedding related data in one document gives atomic updates without multi-document transactions.
Referencing relationship
Storing the _id of a related document instead of the document itself. It avoids duplication and size limits but needs a second query or $lookup.
Many-to-many modeling
Either an array of _id values on one side queried with $in, or a separate edge collection when the relationship itself carries attributes.
Dot notation queries
Addressing fields inside embedded documents or arrays, for example "items.sku". It matches any array element without needing positional syntax on reads.
$elemMatch operator
Matches when a single array element satisfies all listed conditions. Without it, separate conditions may match different elements of the same array.
$jsonSchema validator
A collection validator that enforces required fields, types, and allowed values on insert and update, giving MongoDB collections an enforceable schema contract.
Bounded array with $slice
Using $push with $each and $slice to keep an array at a fixed maximum length, dropping oldest entries automatically on each write.
ESR rule
Compound index field order: Equality fields first, then Sort fields, then Range fields. This order lets the index serve filtering, sorting, and range bounds together.
Index prefix rule
A compound index {a:1,b:1} supports queries filtering on a and on a plus b, but not on b alone. Prefix fields must appear in the query.
Multikey index
An index on an array field creates one entry per element. A compound multikey index permits at most one indexed field to be an array.
Covered query
A query whose filter and projection use only indexed fields, so results come from the index without fetching documents. It requires excluding _id when not indexed.
Partial index
An index built only on documents matching a filter expression. It saves space and write cost when queries always include that filter condition.
TTL index
A single-field index on a date with expireAfterSeconds. A background monitor removes expired documents roughly every 60 seconds.
Text index limit
A collection can have at most one text index, which can span multiple fields with weights. It supports $text search with stemming and stop words.