Skip to main content

Database Design: SQL vs NoSQL

Difficulty: Easy | Topic #2

What to Learn

When to use relational (ACID, joins, strong consistency) vs NoSQL (flexible schema, horizontal scale). Understand document, key-value, wide-column, and graph stores and their tradeoffs.

Resources

Covered by Problems

ProblemDifficultyLink
URL Shortener/BitlyEasy
File Storage/DropboxEasy
FB News FeedMedium
WhatsAppMedium
Online ChessHard

Key Concepts to Master

  • ACID vs BASE properties
  • Normalization vs denormalization for read performance
  • Choosing a primary key and access patterns for NoSQL
  • When to pick Postgres vs DynamoDB vs Cassandra
  • Data modeling for high fan-out vs high-read workloads