NoSQL & MongoDB Fundamentals
Fast recall
Quick revision
Core answer
Whether you understand NoSQL as a family of specialized models that trade relational guarantees for flexibility/scale, and can name when MongoDB (document) fits vs. when SQL fits.
Saying 'NoSQL means no schema and no SQL' — most NoSQL stores have a schema (just flexible/app-level) and many support SQL-like queries; the real distinction is the data model and the guarantee trade-off.
Frame NoSQL as a family of four models (document, key-value, column, graph) each trading relational guarantees for a specific advantage, place MongoDB as the document store, and name the trade-offs (flexible schema, horizontal scale, eventual consistency) vs. SQL (ACID, joins, fixed schema).
Interview-ready guide
Interview answer
NoSQL is a family of databases that trade some of the relational model's guarantees — fixed schema, strict ACID across joins, normalized tables — for flexible schemas, horizontal scale, and data models matched to specific problems.
The four families are document, key-value, column-family, and graph, and MongoDB is the leading document store: it stores data as JSON-like BSON documents with a flexible schema, scales horizontally via sharding, and offers high write throughput.
The trade-off I always name is flexibility versus consistency: a flexible schema lets the data evolve without migrations, but it pushes schema enforcement to the application — every reader has to tolerate missing or extra fields, and that's a real source of bugs.
Horizontal scale via sharding gives you write throughput beyond a single node, but the shard key is a hard-to-change design decision and cross-shard queries are expensive. 0, but using it across many documents costs performance and partially defeats the scale benefit, so the guidance is still to design so you rarely need cross-document transactions.
I'd pick MongoDB for semi-structured, evolving, high-write-scale data, and SQL for transactional, relational data with joins and strict ACID.
NoSQL & MongoDB Fundamentals
Direct Answer
NoSQL ('not only SQL') is a family of databases that relax some of the relational model's guarantees — fixed schema, strict ACID across joins, normalized tables — to gain flexible schemas, horizontal scalability, and data models matched to specific problems (document, key-value, column, graph). MongoDB is the leading document database: it stores data as JSON-like BSON documents with a flexible schema, scales horizontally via sharding, and offers high write throughput and a query model developers find natural. NoSQL exists because the relational model is a poor fit for certain workloads — semi-structured data, massive horizontal scale, rapid schema evolution — and a specialized model serves those better.
Common Mistakes & Pitfalls
Saying 'NoSQL means no schema and no SQL' — most NoSQL stores have a schema (just flexible/app-level) and many support SQL-like queries; the real distinction is the data model and the guarantee trade-off.
Check your understanding
Answer these without looking back at the article.
- What are the four NoSQL families, and what problem is each optimized for?
- What does a flexible schema cost, and where does the enforcement move to?
- How does sharding give MongoDB horizontal scale, and why is the shard key a hard-to-change decision?
- When would you choose SQL over MongoDB, and when is MongoDB clearly better?
- What does multi-document ACID in MongoDB 4.0 cost, and why does it partially defeat the scale benefit?
Related interview prep categories
1Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.