Module Overview
Click a card to access the full module.
Detailed Content
Explore the topics in each module. Click to expand.
⚡ Indexes and Transactions
Master indexes to speed up searches, ACID transactions to ensure consistency, and SQL best practices for professional queries.
An auxiliary structure that speeds up queries by avoiding a full table scan.
Without an index, every search scans the entire table. Performance drops exponentially.
B-tree, Hash, covering index, selectivity, maintenance cost
Command to create indexes by choosing columns and a strategy.
The wrong index is worse than no index. It consumes space and slows down writes.
CREATE INDEX, composite index, partial index, INCLUDE, UNIQUE INDEX
Tools for viewing a query's execution plan and actual cost.
Without EXPLAIN, you're optimizing in the dark. It's an X-ray of performance.
Seq Scan, Index Scan, Nested Loop, Hash Join, estimated vs. actual cost
A set of operations that executes as an atomic unit (all or nothing).
A bank transfer without a transaction can lose money. ACID is essential.
Atomicity, Consistency, Isolation, Durability, BEGIN/COMMIT/ROLLBACK
A setting that defines which changes from other transactions a transaction can see.
Incorrect isolation causes dirty reads, phantom reads, and inconsistent data.
READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE
Patterns and habits for safe, performant, and maintainable queries.
Poorly written SQL and technical debt. Good practices today prevent incidents tomorrow.
Prepared statements, avoid SELECT *, parameters, monitoring
🗂️ Database Types and Comparisons
Learn about the different types of databases, when to use each one, and how to make the right choice for each scenario.
DBMSs with rigid schemas, SQL, ACID, and referential integrity.
More than 40 years of maturity. Standard for OLTP and transactional systems.
PostgreSQL, MySQL, SQL Server, Oracle, SQLite, when to use each
Store JSON/BSON documents without a fixed schema.
Fast iteration, variable content. Ideal for prototyping and CMS.
MongoDB, Couchbase, aggregations, sharding, multi-document transactions
Simple key->value mapping with sub-millisecond latency.
Cache, sessions, queues. Redis is the fastest database in the ecosystem.
Redis, DynamoDB, TTL, persistence, pub/sub, Streams
Store data by column (not by row), optimized for aggregations.
OLAP, data warehouse, BI. Compression and column scans are orders of magnitude faster.
BigQuery, Redshift, ClickHouse, Snowflake, columnar compression
Graphs model complex relationships. Time series optimize chronological data.
Social networks, recommendations, fraud (graphs). IoT, metrics, logs (time series).
Neo4j, InfluxDB, TimescaleDB, Cypher, Prometheus
A framework for selecting the right DBMS based on requirements.
A wrong choice costs months of rework. Decide with sound judgment and professionalism.
OLTP vs OLAP, consistency vs availability, latency, cost, ecosystem