MongoDB vocabulary: Apprentice level
38 MongoDB terms at the Apprentice level, each with a short definition and a link to its full page.
Updated
- $addToSet
- An update operator that adds an item to an array only when the array doesn't hold it yet, such as a favorite tapped twice.
- $all
- A filter operator that matches an array holding every value in a list, in any order, with other items allowed.
- $count
- An aggregation stage that counts the documents reaching it and hands on one document holding that number, in a field you name, such as { orders: 197 }.
- $exists
- A filter operator that matches by whether a field is in the document at all, whatever it holds, null included.
- $in
- A filter operator that matches a field equal to any value in a list, such as a cuisine that is Thai, Japanese or Korean.
- $inc
- An update operator that adds a number to a field inside the database, or subtracts with a negative one, so no count is lost; a missing field counts as 0.
- $push and $pull
- Update operators for an array: $push adds an item to the end, even one already there, and $pull removes every item equal to a value.
- $size
- A filter operator that matches an array with exactly the given number of items.
- $unset
- An update operator that takes a field out of a document altogether, such as a featured flag when the month is over.
- Array Field
- A field holding a list, queried and updated with array operators.
- Cluster
- Atlas's word for a MongoDB it runs for you in the cloud: a small group of servers that keep your data, with copies, and answer your queries.
- Comparison Operators
- $gt, $gte, $lt, $lte, $ne, $in and $nin: filter operators that compare a field with a value or a list, such as minutes under 30.
- Connection String
- The one-line address of a MongoDB, such as mongodb://localhost:27017 on your own computer, or a mongodb+srv address with a user name and password for Atlas.
- countDocuments
- Counts the documents that match a filter, without sending them, such as the total beside one page of results.
- Cursor
- What find gives back: a pointer into the matching documents that hands them over a batch at a time; mongosh shows 20, and typing it shows more.
- Database in MongoDB
- A named group of collections.
- Database User
- A name and password a program signs in to a database with, separate from the account you use on the database's website.
- deleteOne and deleteMany
- Remove one or all matching documents.
- Document Reference
- A field that holds another document's _id to link the two, such as customerId in an order pointing at its customer.
- Dot Notation
- A field name such as "nutrition.calories", in quotes, that reaches a field inside an embedded document or inside each item of an array of documents.
- drop()
- Removes a whole collection, its documents and the collection itself, where deleteMany with an empty filter leaves it there empty.
- Duplicate Key Error
- The E11000 error MongoDB gives when a write would put a second document with the same _id, or another value that must be unique, into a collection.
- Embedded Document
- An object stored inside another document.
- find
- Returns the documents that match a filter.
- findOne
- Gives back the first document that matches a filter, as one document rather than a list, or null when none matches.
- insertOne and insertMany
- Add one or several documents to a collection.
- ISODate
- mongosh's way to write a date, such as ISODate("2026-01-24"), stored as a BSON date that sorts and compares by time.
- Logical Operators
- $and, $or, $not and $nor: filter operators that combine conditions, or flip one and rule it out.
- MongoClient
- The official Node.js driver's connection to a MongoDB server, made from a connection string; db() and collection() pick where the data goes, and close() hangs up.
- null
- A value meaning no value; in a filter, { field: null } matches a field that holds null and a field that is missing altogether.
- Projection
- Chooses which fields a query returns.
- Query Filter
- An object describing which documents to match.
- Query Operators
- $-prefixed conditions like $gt, $in and $or.
- replaceOne
- Swaps a whole document for a new version you give it; every field the new version leaves out is gone, and the _id stays.
- sort, limit and skip
- Order results, cap them, and skip some for paging.
- Update Operators
- $-prefixed instructions such as $set, $inc, $push and $pull that change parts of a document in place, in one step.
- updateMany
- Changes every document that matches a filter, with an update operator such as $set saying what changes.
- updateOne and $set
- Change a matching document; $set updates just the given fields.