0
0
MongoDBquery~5 mins

Document model mental model (JSON/BSON) in MongoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ABSON
BXML
CCSV
DYAML
Which of the following can a MongoDB document contain?
ANested documents and arrays
BOnly simple key-value pairs
COnly arrays
DOnly strings
Why is BSON preferred over JSON in MongoDB?
ABecause BSON is text-based
BBecause BSON is human-readable
CBecause BSON supports additional data types and is faster to process
DBecause BSON is smaller than JSON
In the document model, data is stored as:
ARows and columns
BKey-value pairs inside documents
CFlat files
DLinked lists
What is a key benefit of the document model compared to relational tables?
ARequires more joins
BUses fixed schema
CCannot store arrays
DStores related data together in one place
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.