0
0
MongoDBquery~5 mins

Collections vs tables mental model in MongoDB - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What is a collection in MongoDB?
A collection in MongoDB is like a folder that holds many documents. It is similar to a table in a traditional database but stores data in flexible, JSON-like documents.
Click to reveal answer
beginner
How does a table in SQL differ from a collection in MongoDB?
A table in SQL has a fixed schema with rows and columns, while a MongoDB collection stores documents that can have different structures and fields.
Click to reveal answer
beginner
Why is a MongoDB collection compared to a folder in real life?
Because just like a folder holds many files, a collection holds many documents. Each document can be different, just like files can be different types.
Click to reveal answer
beginner
Can documents in the same MongoDB collection have different fields?
Yes, documents in the same collection can have different fields and structures, unlike rows in a SQL table which must follow the same columns.
Click to reveal answer
intermediate
What is the main advantage of collections over tables in terms of data structure?
Collections allow flexible and dynamic data structures, so you can store different types of data together without needing to define a strict schema upfront.
Click to reveal answer
In MongoDB, what is the closest equivalent to a SQL table?
ACollection
BDocument
CField
DIndex
Which of the following is true about MongoDB collections?
AAll documents must have the same fields
BCollections have fixed columns like tables
CDocuments can have different fields
DCollections store data in rows and columns
What is a good real-life analogy for a MongoDB collection?
AA database server
BA spreadsheet
CA single file
DA folder holding files
Which statement best describes a SQL table compared to a MongoDB collection?
ATables store JSON documents, collections store rows
BTables have fixed columns, collections allow flexible document structures
CTables have flexible schemas, collections have fixed schemas
DTables and collections are exactly the same
Why might someone choose a MongoDB collection over a SQL table?
ATo store data with flexible and changing structures
BTo avoid using documents
CTo use rows and columns format
DTo enforce strict data types
Explain the mental model comparing MongoDB collections and SQL tables.
Think about how files in a folder can be different, but rows in a spreadsheet follow the same columns.
You got /4 concepts.
    Describe the main difference in data structure flexibility between collections and tables.
    Consider how MongoDB handles data compared to traditional SQL databases.
    You got /4 concepts.