Recall & Review
beginner
What is a 'row' in traditional relational databases?
A row is a single record in a table that holds data for each column. Think of it like a single line in a spreadsheet representing one item or person.
Click to reveal answer
beginner
What is a 'document' in MongoDB?
A document is a data record stored in a flexible, JSON-like format. It can hold nested information and different fields, like a detailed profile card with many sections.
Click to reveal answer
intermediate
How does a document differ from a row in terms of structure?
A row has fixed columns with set data types, while a document can have varying fields and nested data, allowing more flexible and rich information in one place.
Click to reveal answer
intermediate
Why might you choose documents over rows for some applications?
Documents let you store related data together, reducing the need to join tables. This is great for complex or changing data, like user profiles with different preferences.Click to reveal answer
beginner
Can documents in MongoDB have different fields in the same collection?
Yes! Unlike rows in tables, documents in the same collection can have different fields and structures, giving flexibility to store diverse data together.
Click to reveal answer
In a relational database, what does a row represent?
✗ Incorrect
A row is a single record in a table with fixed columns.
Which of the following best describes a MongoDB document?
✗ Incorrect
MongoDB documents are JSON-like and can contain nested fields.
What is a key advantage of documents over rows?
✗ Incorrect
Documents can store related data together, reducing the need for joins.
Can documents in the same MongoDB collection have different fields?
✗ Incorrect
MongoDB allows documents in the same collection to have different fields.
Which data model is more like a spreadsheet row?
✗ Incorrect
A row in a relational database is like a spreadsheet row.
Explain the main differences between rows in relational databases and documents in MongoDB.
Think about structure and flexibility.
You got /4 concepts.
Why might a developer choose to use documents instead of rows for storing user profile data?
Consider flexibility and data relationships.
You got /4 concepts.