MongoDB Developer Associate key terms
MongoDB Developer Associate · Get comfortable with the vocabulary.
- BSON
- Related: Document, ObjectId, Decimal128
Binary JSON, the serialization format MongoDB uses to store documents on disk and send them over the wire. It extends JSON with types like ObjectId, Date, Decimal128, and binary data.
- Document
- Related: Collection, BSON, Embedded document
A single record in MongoDB, written as an ordered set of field-value pairs similar to JSON. Documents are the basic unit of storage and are grouped into collections.
- Collection
- Related: Document, Schema validation, Database
A named group of documents inside a database, roughly analogous to a table in relational systems. Collections do not enforce a fixed schema unless validators are configured.
- ObjectId
- Related: _id field, BSON
A 12-byte BSON value used as the default _id: a 4-byte timestamp, 5-byte random process value, and 3-byte counter. It is roughly time-ordered and unique without a central sequence.
- _id field
- Related: ObjectId, Unique index
The mandatory unique identifier for every document in a collection. MongoDB creates an ObjectId if none is supplied, and a unique index on this field is created automatically.
- Embedded document
- Related: Document, Dot notation, 16 MB document limit
A document nested as the value of a field inside another document. Embedding keeps related data together so it can be read in one query, but nested documents have size limits.
- Dot notation
- Related: Embedded document, Projection, Update operator
The path syntax using dots to address fields inside embedded documents or arrays, such as address.city or items.price. It is used in queries, projections, updates, and index definitions.
- CRUD operations
- Related: Update operator, Write concern, Read concern
The four core data operations: create (insertOne, insertMany), read (find, findOne), update (updateOne, updateMany, replaceOne), and delete (deleteOne, deleteMany). Drivers expose them as language-specific methods.
- Query filter
- Related: Query operator, Projection, Cursor
The document passed to find or update methods that selects matching records. Fields are matched by equality by default, and comparison, logical, and array operators can refine the selection.
- Query operator
- Related: Query filter, Dot notation
A $-prefixed keyword such as $gt, $in, $regex, or $elemMatch that expresses conditions beyond simple equality. Operators can be combined with $and, $or, and $nor for complex filters.
- Projection
- Related: Query filter, Covered query
A document specifying which fields a query should return, using 1 to include and 0 to exclude. Except for _id, inclusion and exclusion cannot be mixed in the same projection.
- Cursor
- Related: Batch size, Query filter
An iterator over query results that fetches documents in batches rather than all at once. Drivers expose methods like hasNext and next, and the server closes idle cursors after a timeout.
- Update operator
- Related: Upsert, Array operator, CRUD operations
A $-prefixed instruction such as $set, $unset, $inc, $push, or $pull that modifies specific fields without replacing the whole document. Replacements instead pass a full document without operators.
- Upsert
- Related: Update operator, Write concern
An option on update operations that inserts a new document when no record matches the filter. The new document combines equality conditions from the filter with the update operators applied.
- Array operator
- Related: Update operator, Dot notation
An update operator that manipulates array fields, such as $push, $addToSet, $pop, $pull, and $pullAll. Positional $ and arrayFilters let you target specific elements.
- Aggregation pipeline
- Related: $group stage, $lookup stage, $match stage
A sequence of stages that transforms documents, each stage passing results to the next. Stages like $match, $group, $project, $sort, and $lookup express filtering, reshaping, and joining.
- $match stage
- Related: Aggregation pipeline, Query filter, Index
An aggregation stage that filters documents using the same syntax as a query filter. Placed first, it lets the planner use indexes and reduces work for later stages.
- $group stage
- Related: Aggregation pipeline, Accumulator
An aggregation stage that groups documents by an _id expression and computes accumulators such as $sum, $avg, $min, $max, and $push. It resembles SQL GROUP BY.
- $lookup stage
- Related: Aggregation pipeline, Reference
An aggregation stage that performs a left outer join with another collection in the same database. It matches local fields against foreign fields and adds an array of matched documents.
- Accumulator
- Related: $group stage, Aggregation pipeline
An expression used inside $group or $bucket that computes a value across grouped documents, for example $sum, $avg, or $first. Some accumulators are also usable in $setWindowFields.
- Index
- Related: Compound index, explain(), Collection scan
A B-tree structure that stores a small portion of collection data in an order that speeds matching and sorting. Without a suitable index, the server must scan every document in the collection.
- Compound index
- Related: Index, Index prefix, Multikey index
An index on multiple fields whose key order matters for both equality and sort. The prefix rule means a query can use the index only if it filters on a leading portion of the keys.
- Index prefix
- Related: Compound index, explain()
A leading subset of a compound index's fields that a query can use on its own. For an index on {a:1, b:1, c:1}, queries on a or on a and b can use it efficiently.
- Multikey index
- Related: Index, Compound index
An index on an array field that creates entries for each element, allowing queries on array contents. A compound index can include at most one array field.
- Unique index
- Related: Index, _id field, Duplicate key error
An index that rejects inserts and updates producing duplicate key values. The _id index is always unique, and a unique index on other fields enforces a business rule.
- explain()
- Related: Index, Collection scan, Query planner
A method that reports how the query planner executes a query, including the winning plan, stages used, documents examined, and whether an index was applied.
- Collection scan
- Related: Index, explain()
A query execution strategy that examines every document because no usable index exists. It appears as a COLLSCAN stage in explain output and usually signals a missing index.
- Replica set
- Related: Oplog, Write concern, Read preference
A group of mongod processes maintaining the same data, with one primary accepting writes and secondaries replicating its oplog. Failover elects a new primary if the current one becomes unavailable.
- Oplog
- Related: Replica set, Write concern
The capped collection on each replica set member that records every write in an idempotent form. Secondaries tail it to apply changes, and its size bounds how long a member can be offline.
- Write concern
- Related: Replica set, Read concern, Read preference
A setting that specifies how many replica set members must acknowledge a write before it returns, such as w:1 or w:"majority". It trades durability for latency.
- Read concern
- Related: Write concern, Read preference, Replica set
A setting controlling the consistency of data returned by a read, such as local or majority. Higher levels may return older but more durable data from a replica set.
- Read preference
- Related: Replica set, Read concern
A client setting that chooses which replica set members serve reads, such as primary, secondary, or nearest. It affects latency and freshness but not write routing.
- Schema validation
- Related: Collection, Document
Optional per-collection rules using JSON Schema or query expressions that reject documents not matching the declared shape. Validation can be applied on insert and update with configurable strictness.
- 16 MB document limit
- Related: Embedded document, GridFS
The maximum size of a single BSON document, which constrains how much data can be embedded. Data exceeding it must be split across documents or stored in GridFS.
- GridFS
- Related: 16 MB document limit, BSON
A specification for storing files larger than the document size limit by splitting them into chunks across two collections. Drivers provide APIs for reading and writing these files.
- Reference
- Related: Embedded document, $lookup stage
A pattern where a document stores the _id of a related document instead of embedding it. References avoid duplication but require a second query or a $lookup to resolve.
- MongoClient
- Related: Connection string, Connection pool
The driver object that manages a connection pool to a deployment and is created once per application. From it, applications obtain databases and collections for operations.
- Connection string
- Related: MongoClient, Connection pool
A URI such as mongodb://host:27017/db that tells a driver where to connect and which options to apply. It can list multiple hosts for a replica set or use the mongodb+srv scheme.
- Connection pool
- Related: MongoClient, Connection string
A driver-managed set of reusable sockets to the server, sized by options like maxPoolSize. Reusing connections avoids handshake overhead and bounds concurrency.
- Duplicate key error
- Related: Unique index, Write concern
The error raised when a write violates a unique index, reported with code 11000. Drivers surface it as an exception or rejected promise that applications must handle.