codeworking.org
Search
Core Track Intermediate ⏱️ 14 hours 3 Lessons

Databases & SQL Engineering

From relational algebra & ACID guarantees to query engines, indexing, and distributed data systems.

Master the data backbone of modern software. Learn relational algebra, SQL DDL/DML, normalization, B-Tree storage engines, query planners, transactions, NoSQL topologies, and distributed consensus.

Track Mastery Progress 0 of 3 Lessons Completed (0%)
Test Knowledge ➔

Course Overview

Welcome to Databases & SQL Engineering on codeworking.org. Data is the lifeblood of every modern application. Without reliable, performant, and consistent storage systems, software collapses under scale.

What You Will Master

  • Relational Algebra & Normalization: The mathematical proofs (Codd’s relational model) and 1NF/2NF/3NF/BCNF schema design.
  • SQL Mastery: Writing elegant ANSI SQL queries, aggregations, multi-table joins, subqueries, and analytical Window functions.
  • Database Engine Internals: How storage engines organize 8KB disk pages, manage buffer pools, and utilize B+ Trees for instant indexing.
  • ACID & Concurrency: Mastering transaction isolation levels, Multi-Version Concurrency Control (MVCC), and locking protocols.
  • Distributed Scaling & NoSQL: Document stores, caching layers, columnar OLAP engines, sharding, replication, and CAP theorem trade-offs.

Prerequisites

  • Basic familiarity with general programming logic. No prior database or SQL experience necessary.

Structured Learning Roadmap

6 Modules • 3 Step-by-Step Lessons
02
Module 02

Intermediate SQL: Aggregations, Joins & Subqueries

Grouping sets, INNER/OUTER/CROSS joins, hash vs nested loop join algorithms, CTEs, and Window functions.

05

Aggregations & Grouping: COUNT, SUM, GROUP BY & HAVING Mechanics

Planned

Aggregation semantics, filtering grouped rows with HAVING vs WHERE, and distinct counts.

🔒 In Preparation
06

Relational Joins: INNER, LEFT, RIGHT, FULL, CROSS & Join Algorithms

Planned

Venn diagrams vs tuple products, Nested Loop Join, Hash Join, and Sort-Merge Join.

🔒 In Preparation
07

Subqueries, Common Table Expressions (CTEs) & Recursive SQL

Planned

Correlated subqueries, WITH clauses, temporary materialization, and hierarchical graph traversal.

🔒 In Preparation
08

Advanced Analytical SQL: Window Functions & Partitioning

Planned

OVER(PARTITION BY ... ORDER BY), ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG, and rolling moving averages.

🔒 In Preparation
03
Module 03

Database Internals, Storage Engines & Indexing

Pages, buffer pools, WAL, B-Trees, LSM trees, covering indexes, and query planner cost models.

09

Under the Hood: How a Database Executes a Query

Planned

Parser, Analyzer, Query Optimizer, Cost Planner, and Execution Engine mechanics.

🔒 In Preparation
10

Disk Storage Architecture: Pages, Slotted Pages & Buffer Pools

Planned

8KB/16KB page layouts, row offsets, dirty pages, LRU eviction, and Write-Ahead Logging (WAL).

🔒 In Preparation
11

Index Engineering: B-Trees, B+ Trees & Hash Indexes

Planned

B+ Tree fanout, logarithmic leaf lookups, clustered vs non-clustered indexes, and composite indexing.

🔒 In Preparation
12

Query Optimization, EXPLAIN ANALYZE & Cost Models

Planned

Interpreting EXPLAIN trees, Seq Scan vs Index Scan, cardinality estimation, and statistics.

🔒 In Preparation
04
Module 04

Transactions, Concurrency Control & ACID Guarantees

Atomicity, Consistency, Isolation, Durability, Dirty Reads, 2PL, MVCC, and Deadlocks.

13

ACID Guarantees & Transaction Lifecycle

Planned

BEGIN, COMMIT, ROLLBACK, write-ahead logging (WAL), crash recovery, and ARIES algorithm.

🔒 In Preparation
14

Isolation Levels & Concurrency Anomalies

Planned

Read Uncommitted, Read Committed, Repeatable Read, Serializable, Dirty Reads, and Phantom Reads.

🔒 In Preparation
15

Locking Mechanisms, Two-Phase Locking (2PL) & Deadlocks

Planned

Shared (S) vs Exclusive (X) locks, Intent locks, table/row locks, and deadlock detection graphs.

🔒 In Preparation
16

Multi-Version Concurrency Control (MVCC) in PostgreSQL & MySQL

Planned

Non-blocking reads, transaction snapshots, xmin/xmax tuple metadata, and VACUUM garbage collection.

🔒 In Preparation
05
Module 05

NoSQL Architectures & Polyglot Persistence

Document, Key-Value, Columnar, and Graph databases, Redis, Cassandra, MongoDB, and Neo4j.

17

The NoSQL Paradigm: Polyglot Persistence & Tradeoffs

Planned

Why NoSQL emerged, impedance mismatch, vertical vs horizontal scaling, and BASE semantics.

🔒 In Preparation
18

Document Stores: MongoDB, JSON/BSON & Flexible Schemas

Planned

BSON binary format, embedded documents vs references, indexing JSON attributes, and aggregations.

🔒 In Preparation
19

Key-Value Stores & In-Memory Caching: Redis & Memcached

Planned

In-memory RAM speeds, Redis data structures (Strings, Hashes, Sets, Sorted Sets), and persistence.

🔒 In Preparation
20

Wide-Column & Analytical Databases: Cassandra & ClickHouse

Planned

Columnar storage layouts, LSM trees, SIMD vectorized analytics, and high-throughput aggregations.

🔒 In Preparation
06
Module 06

Distributed Data Systems, Scaling & High Availability

Replication, Sharding, CAP theorem, PACELC, Two-Phase Commit (2PC), and Raft consensus.

21

Database Replication: Master-Replica, Multi-Master & Consensus

Planned

Synchronous vs asynchronous replication, replication lag, read replicas, and failover.

🔒 In Preparation
22

Horizontal Partitioning & Sharding Strategies

Planned

Range sharding, Hash sharding, Directory-based sharding, rebalancing, and cross-shard queries.

🔒 In Preparation
23

The CAP Theorem, PACELC & Consistency Models

Planned

Consistency vs Availability vs Partition tolerance, Strong vs Eventual consistency, and Read-Your-Writes.

🔒 In Preparation
24

Distributed Transactions: 2PC, Saga Pattern & Distributed SQL

Planned

Two-Phase Commit protocol, Saga orchestrations, Google Spanner, TrueTime, and CockroachDB.

🔒 In Preparation