{}DSA Atlas

Database Management Systems

ER modelling, relational schema design and normalization, SQL from basics to window functions, indexing and query execution, transactions/ACID/isolation/MVCC, NoSQL families, CAP/PACELC, replication, sharding, time-series and analytical storage, and real schema-design case studies.

9 chapters71 interview questionsPractice this track’s questions →

Almost every system design question ends in "…and where do you store the data?". Interviewers want to see that you can model data, write correct SQL, reason about indexes and transactions, and choose and scale the right store. This track goes from the ground up — entity-relationship diagrams — to distributed databases.

Chapters

  1. ER modelling — entities, relationships, cardinality, weak entities, mapping ER to tables.
  2. Relational model & normalization — keys, functional dependencies, 1NF → BCNF, 4NF, when to denormalize.
  3. SQL mastery — joins, aggregation, subqueries, CTEs, window functions, NULL semantics, and the classic interview queries.
  4. Indexing & query execution — B+ trees, LSM trees, hash/bitmap/GIN indexes, composite and covering indexes, EXPLAIN, join algorithms.
  5. Transactions & concurrency control — ACID, isolation levels and anomalies, 2PL, MVCC, WAL and crash recovery.
  6. NoSQL & choosing a database — key-value, document, wide-column, graph, search, vector; SQL vs NoSQL.
  7. Distributed data — CAP and PACELC, replication topologies, quorums, sharding strategies, consistent hashing, distributed transactions.
  8. Storage engines, analytics & time-series — row vs column stores, OLTP vs OLAP, warehouses and lakes, time-series storage, CDC.
  9. Schema design patterns & case studies — IDs, soft deletes, audit logs, multi-tenancy, polymorphism, e-commerce and social schemas.

Chapters

In recommended order
Entities, attributes (simple, composite, multivalued, derived), relationships, cardinality and participation, weak entities, specialisation/generalisation, and the step-by-step mapping from an ER diagram to relational tables — with a full worked example.
6 Q
Relations, keys (super, candidate, primary, alternate, foreign, surrogate), integrity constraints, functional dependencies and closures, anomalies, 1NF through BCNF with one running example, 4NF/5NF, lossless and dependency-preserving decomposition, and when to denormalize.
7 Q
SQL command families, logical query order, every join type, GROUP BY/HAVING, subqueries and EXISTS, CTEs and recursion, window functions, NULL pitfalls, upserts, and 15 classic interview queries solved (Nth salary, duplicates, top-N per group, gaps & islands, running totals, retention…).
12 Q
How databases store rows in pages, B-trees vs B+ trees, clustered vs secondary indexes, composite and covering indexes and the leftmost-prefix rule, hash, bitmap, GIN/GiST, partial and expression indexes, LSM trees, the query optimizer, EXPLAIN, and join algorithms.
9 Q
ACID in depth, isolation levels and every anomaly (dirty read, non-repeatable read, phantom, lost update, write skew), locking and two-phase locking, MVCC and snapshot isolation, SSI, optimistic vs pessimistic control, SELECT FOR UPDATE/SKIP LOCKED, and how WAL and ARIES make transactions durable.
8 Q
Key-value, document, wide-column, graph, search, time-series and vector databases — data models, strengths, weaknesses, query-first modelling (Cassandra/DynamoDB single-table design), BASE, and a practical SQL-vs-NoSQL decision framework.
7 Q
CAP and PACELC, consistency models from linearizable to eventual, replication (single-leader, multi-leader, leaderless quorums), replication lag anomalies, failover and split brain, partitioning/sharding strategies, consistent hashing, rebalancing, hot keys, secondary indexes, and distributed transactions (2PC, sagas).
10 Q
Row vs column storage, OLTP vs OLAP, data warehouses, lakes and lakehouses, star schemas, ETL/ELT and CDC, time-series storage (partitioning, compression, downsampling, retention, high cardinality), object storage, and backups/PITR.
6 Q
Identifier strategies (auto-increment, UUIDv4/v7, ULID, Snowflake), money and time types, soft deletes, audit/history tables, multi-tenancy models, polymorphic associations, EAV vs JSONB, trees in SQL, zero-downtime migrations, and full schemas for e-commerce, social feed and booking systems.
6 Q