Q&A-1Explain what NoSQL means and why the term is not very useful.
Answer
"NoSQL" is a 2009-era label for stores that dropped the relational model. It survives as a convenient negation, not as a description. A Redis instance and Neo4j share exactly one property: neither is Postgres. Everything an interviewer actually cares about (data model, query shape, consistency, failure mode) is decided by which family you picked, and the label hides that.
What the families do share is the shape of the trade: give up generality (joins, ad-hoc queries, multi-row transactions, strong consistency) to buy something specific.
| family | examples | queryable by | what you give up |
|---|---|---|---|
| key-value | Redis, DynamoDB | the key, nothing else | querying by value; Redis keeps data in RAM |
| document | MongoDB, Couchbase | any indexed field in the document | joins; MongoDB caps a document at 16 MB |
| wide-column | Cassandra, HBase | the partition key, then clustering columns | any query that doesn't name the partition key |
| graph | Neo4j, Neptune | traversal from a start node | cheap full-graph aggregation |
What breaks. Four failure modes the choice invites, and how you'd catch each.
Eventual consistency surprises. DynamoDB reads are eventually consistent by default, so a read issued right after a write can miss it; strongly consistent reads exist and cost 2x the RCU. Cassandra's consistency is per query (ONE, QUORUM, ALL), so a QUORUM write followed by a ONE read can return the old value. Catch it with read-your-writes assertions in integration tests: production dashboards won't show it.
Hot partitions. DynamoDB caps a single partition at 3,000 RCU / 1,000 WCU, so one popular partition key throttles while the table's overall capacity sits idle. Cassandra's version is a partition that outgrows its node; the common rule of thumb is to keep partitions under ~100 MB. Catch it in DynamoDB's ThrottledRequests and per-key consumed capacity, and in Cassandra's nodetool tpstats and coordinator timeouts.
Unbounded queries. Cassandra's ALLOW FILTERING, DynamoDB's Scan, and an unindexed MongoDB find all read everything. They pass in dev at 10k rows and take the cluster down at 100M. Catch them in slow-query logs and MongoDB's profiler.
Schema drift. Document stores don't enforce a schema, so two documents in one collection diverge and the code reading field X breaks on the one written by an older service version. MongoDB's $jsonSchema validator (3.2+) is the fix, and it's opt-in. Catch it with a sampling job, or in production.
The trade has narrowed. Postgres has had JSONB with GIN indexes since 9.4; MySQL's JSON type since 5.7. Distributed SQL (CockroachDB, Spanner) shards and keeps serializable transactions. "Relational can't do JSON" and "relational can't scale" were fair in 2010; both need re-checking now.
So the framing isn't "SQL or NoSQL," it's "what does this workload need that my default can't give?" That forces a specific gap to be named, and often the honest answer is that there isn't one.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.