Full-Stack & Backend Database Master: SQL, NoSQL, Redis & System Design
PostgreSQL, MySQL, ACID, B-Tree indexes, MVCC, MongoDB aggregation, DynamoDB single-table design, Redis caching, and real-time scaling.
Curriculum Roadmap & Learning Path
5 StagesPart 1: Candid Database Experience & Intro Scenarios (1 - 5)
5 QuestionsWhat is a Database Management System (DBMS), and what are the foundational differences between Relational (SQL) and Non-Relational (NoSQL) databases?
Walk me through your production database architecture experience and database selection criteria.
How do you handle schema migrations without downtime?
Describe a severe database performance issue you resolved.
Strategy for database security and connection pooling:
Part 2: Relational Databases (RDBMS / PostgreSQL / MySQL) (6 - 25)
20 QuestionsWhat are the ACID properties in relational databases?
Normalization (1NF to BCNF) vs Denormalization:
Primary Key vs Unique Key vs Foreign Key:
SQL Transaction Isolation Levels:
Dirty Reads vs Non-Repeatable Reads vs Phantom Reads:
How do B-Tree indexes work internally?
Clustered Index vs Non-Clustered Index:
Composite Index and the "Leftmost Prefix Rule":
EXPLAIN vs EXPLAIN ANALYZE:
SQL Joins comparison:
Join Execution Algorithms (Nested Loop, Hash Join, Merge Join):
PostgreSQL JSONB and GIN Indexes:
Database Connection Pooling (PgBouncer):
Deadlocks in SQL transactions:
Table Partitioning vs Sharding:
Stored Procedures, Triggers, and Views:
Soft Deletes and Partial Indexes:
Write-Ahead Logging (WAL) and PITR:
MVCC and VACUUM in PostgreSQL:
The N+1 Query Problem in ORMs:
Part 3: NoSQL & Document Databases (MongoDB, DynamoDB) (26 - 40)
15 QuestionsCAP Theorem:
When to choose MongoDB over PostgreSQL:
MongoDB: Embedding vs Referencing:
MongoDB Aggregation Pipeline:
MongoDB Compound & Multikey Indexes:
Replica Sets vs Sharded Clusters in MongoDB:
MongoDB Oplog & Change Streams:
MongoDB Transactions:
Write Concerns & Read Concerns:
TTL (Time-To-Live) Indexes:
DynamoDB Partition Keys, Sort Keys & Hot Partitions:
DynamoDB GSI vs LSI:
Optimistic vs Pessimistic Locking:
Eventual Consistency:
Wide-Column (Cassandra) vs Graph (Neo4j):
Part 4: In-Memory Caching & Fast Data Stores (Redis) (41 - 50)
10 QuestionsWhy single-threaded Redis handles 100k+ ops/sec:
Core Redis Data Structures:
Caching Strategies:
Cache Stampede vs Penetration vs Avalanche:
Redis Eviction Policies:
Redis Persistence: RDB vs AOF:
Redis Sliding Window Rate Limiter:
Distributed Locks in Redis (Redlock):
Redis Pub/Sub vs Redis Streams:
When Redis caching is architectural overkill:
Part 5: Real-Time Architecture, Replication & Scale (51 - 60)
10 QuestionsRead-Write Splitting (Primary/Replica):
Change Data Capture (CDC):
Database Sharding:
Database Failover & Leader Election (Raft):
The Transactional Outbox Pattern:
Full-Text Search: Elasticsearch vs SQL LIKE vs tsvector:
Time-Series Databases (TimescaleDB, InfluxDB):
Connection Starvation & Circuit Breakers:
Vector Databases (pgvector, Pinecone) & HNSW:
RPO vs RTO Disaster Recovery: