Documents and collections, BSON, CRUD operators, aggregation pipeline, indexes, replica sets and sharding.
40 cards · basic cards · AI-written, checked twice. Edit anything.
- What is a document in MongoDB?
Show answer
A record or JSON-like object that stores data.
- What is a collection in MongoDB?
Show answer
A group or set of documents stored together.
- What field uniquely identifies every MongoDB document?
Show answer
The _id field.
- What is the default data format for MongoDB documents?
Show answer
BSON (Binary JSON).
- Can a MongoDB document contain nested documents?
Show answer
Yes, documents can contain other documents as values.
- What is the maximum size of a single MongoDB document?
Show answer
16 megabytes.
- What is BSON in MongoDB?
Show answer
A binary-encoded serialization format for JSON-like documents.
- Name three data types supported by BSON.
Show answer
Date, ObjectId, Binary (other examples: Int32, Int64, Double, String, Array, Document, Boolean, Null).
- What key advantage does BSON have over JSON?
Show answer
BSON supports more data types and is more efficient for storage and transmission.
- Does BSON support array data types?
Show answer
Yes, BSON has native support for arrays.
- What does CRUD stand for?
Show answer
Create, Read, Update, Delete.
- What MongoDB method creates a new document?
Show answer
insertOne or insertMany.
- What MongoDB method retrieves documents from a collection?
Show answer
find or findOne.
- What MongoDB methods modify existing documents?
Show answer
updateOne, updateMany, or replaceOne.
- What MongoDB methods remove documents from a collection?
Show answer
deleteOne or deleteMany.