Question 1 / 50
How would you explain MongoDB to someone who already knows relational databases?
Short answer
MongoDB stores data as documents in collections, not rows in tables. A document can hold nested objects and arrays, so related data that is read together often lives in one place instead of across joined tables.
Why?
The useful comparison is the access pattern, not the marketing line 'MongoDB is schemaless'. SQL shines when relationships are many, constraints belong in the database, and ad-hoc joins are the default. MongoDB shines when the common read is a whole aggregate — an order with its line items — and you want that in one round trip. You still have a schema; it just lives in the documents and in application code, optionally backed by collection validation.
Interview tip
Lead with 'documents versus rows' and then say when you would still pick Postgres. Interviewers want the trade-off, not a MongoDB advertisement.
Common mistake
Saying MongoDB has no schema, or that it cannot do relationships. It can — you embed, you reference, or you $lookup.
How did you do?
Cheat Sheet