ZZomato·Tech KnowledgeL1System Design

NoSQL vs Relational Databases: Use Cases and Tradeoffs

Problem Compare NoSQL databases with traditional relational databases, and explain the scenarios where you would prefer one over the other.

Be ready to discuss

  • Data model: fixed, normalized relational schemas with foreign keys versus document, key-value, wide-column, and graph models that store denormalized aggregates shaped to the read path.
  • Schema evolution: migrations and locking on large relational tables versus schema-on-read flexibility, and the cost NoSQL pushes onto the application (version handling, defensive reads).
  • Scaling: vertical scale plus sharding/replication complexity in relational systems — cross-shard joins and distributed transactions — versus horizontal partitioning as a first-class NoSQL primitive.
  • Consistency and transactions: ACID guarantees and multi-row transactions versus eventual consistency and per-document/per-key atomicity, framed through CAP and the C-vs-A choice under partition.
  • Query capability: expressive ad-hoc SQL with joins, aggregations, and a cost-based optimizer versus access patterns you must design for up front in NoSQL.
  • Choosing: relational for financial ledgers, reporting, and richly related entities; NoSQL for session stores, catalogs, event logs, and very high write throughput with simple lookups. Polyglot persistence — using both — is a legitimate answer.
asked …
LeaderboardSalaryAccount