Recall & Review
beginner
What is a document in MongoDB?
A document is a basic unit of data in MongoDB, stored in a format similar to JSON called BSON. It contains data as key-value pairs.
Click to reveal answer
intermediate
How does BSON differ from JSON?
BSON is a binary format that extends JSON by supporting additional data types like dates and binary data, making it efficient for storage and speed in MongoDB.
Click to reveal answer
beginner
Why is the document model compared to a real-life form or record?
Because like a form with fields and values, a document stores related information together in one place, making it easy to understand and use.
Click to reveal answer
intermediate
Can documents in MongoDB contain nested documents or arrays?
Yes, documents can have nested documents and arrays, allowing complex data structures to be stored in a single document.
Click to reveal answer
intermediate
What is the advantage of using a document model over traditional tables?
The document model stores related data together, reducing the need for complex joins and making data retrieval faster and more intuitive.
Click to reveal answer
What format does MongoDB use to store documents internally?
✗ Incorrect
MongoDB stores documents in BSON, a binary form of JSON that supports more data types.
Which of the following can a MongoDB document contain?
✗ Incorrect
Documents can contain nested documents and arrays, allowing complex data structures.
Why is BSON preferred over JSON in MongoDB?
✗ Incorrect
BSON supports more data types like dates and binary data and is optimized for speed.
In the document model, data is stored as:
✗ Incorrect
Data is stored as key-value pairs inside documents, similar to JSON objects.
What is a key benefit of the document model compared to relational tables?
✗ Incorrect
The document model stores related data together, reducing the need for joins and improving performance.
Explain the document model in MongoDB using a real-life analogy.
Think about how you fill out a form with different fields and sometimes sections inside it.
You got /4 concepts.
Describe the differences and advantages of BSON compared to JSON in MongoDB.
Consider why MongoDB would choose a format that is not plain text.
You got /4 concepts.