Intro to Database Systems
Prof. Andy PavloInside modern relational and analytical DBMS internals: relational algebra, slotted-page storage, log-structured merge trees, columnar compression, buffer pool management, and hash/B+Tree indexes.
Syllabus
22F2023 #00 - Course Overview & Logistics (CMU Intro to Database Systems)
This session outlines the structure, expectations, and administrative details for Carnegie Mellon University's 15-445/645 Introduction to Database Systems course. It details grading policies, assignments, and semester schedule.
CMU 15-445 #01: The Relational Model & Relational Algebra
Traces Ted Codd's 1970 revolution over navigational CODASYL databases—why separating logical relational algebra from physical access paths made modern query optimizers possible.
CMU 15-445 #02: Modern SQL — Window Functions, CTEs & Bag Semantics
Moves far beyond SELECT-FROM-WHERE into modern declarative SQL-99+: window functions, recursive CTEs, lateral joins, and aggregation edge cases.
CMU 15-445 #03: Database Storage I — Volatile vs. Non-Volatile Hierarchy & Slotted Pages
Why mmap() in a DBMS is a catastrophic trap, how NVMe/SSD block geometry dictates page layout, and how slotted pages and heap files store variable-length tuples.
CMU 15-445 #04: Database Storage II — Log-Structured Merge Trees (LSM) & Tuple Layout
Compares page-oriented B+Tree storage (PostgreSQL) against append-only Log-Structured Merge Trees (RocksDB, LevelDB, Cassandra), compaction strategies, and Bloom filters.
CMU 15-445 #05: OLTP vs. OLAP Storage Models & Database Compression
Deconstructs NSM row stores vs. DSM columnar formats (Parquet/ORC) and shows how dictionary, run-length, and bit-packing compression allow late-materialization query execution directly on compressed data.
CMU 15-445 #06: Buffer Pool Managers, LRU-K Eviction & Direct I/O
Explains why databases bypass OS page caches via O_DIRECT, manage page pin counts and latches, and prevent sequential-scan pollution using LRU-K and Clock policies.
CMU 15-445 #07: Static & Dynamic Hash Tables (Linear Probe, Robin Hood, Cuckoo, Extendible)
Cache-conscious engineering walkthrough of open-addressing probe schemes (Robin Hood, Cuckoo) and disk-friendly dynamic hashing (Extendible and Linear Hashing).
Lecture 8: B+Tree Indexes (15-445)
This lecture dissects the architecture and operational mechanics of B+Tree indexes, focusing on their efficacy in database systems for efficient data retrieval and storage organization.
Lecture 9: Index Concurrency Control (15-445)
The session explores methods for managing concurrent access to database indexes, including various locking protocols and their implications for performance and consistency.
Lecture 10: Sorting & Aggregation Algorithms (15-445)
This lecture examines fundamental sorting and aggregation algorithms critical for optimizing database query processing, including external sorting and hash-based aggregation techniques.
Lecture 11: Join Algorithms (15-445)
The session delves into various join algorithms used in relational databases, such as nested-loop join, hash join, and sort-merge join, evaluating their performance characteristics.
Lecture 12: Query Execution Part 1 (15-445)
This lecture initiates a two-part series on query execution, covering the foundational concepts of how database systems process and evaluate SQL queries.
Lecture 13: Query Execution Part 2 (15-445)
Continuing the discussion on query execution, this part explores advanced strategies and implementation details that database management systems employ to fulfill query requests efficiently.
Lecture 14: Query Planning & Optimization (15-445)
This lecture focuses on the sophisticated mechanisms of query planning and optimization, including cost-based optimization and heuristic approaches to generate optimal execution plans.
Lecture 15: Concurrency Control Theory (15-445)
This lecture introduces the theoretical underpinnings of concurrency control in database systems, emphasizing serializability, atomicity, and the ACID properties.
Lecture 16: Two-Phase Locking Concurrency Control (15-445)
The session rigorously details the Two-Phase Locking (2PL) protocol, a cornerstone mechanism for ensuring serializability and maintaining consistency in concurrent database transactions.
Lecture 17: Timestamp Ordering Concurrency Control (15-445)
This lecture explores Timestamp Ordering (TO) as an alternative concurrency control protocol, analyzing its mechanisms for ensuring transaction serializability through temporal stamps.
Lecture 18: Multi-Version Concurrency Control (15-445)
The lecture examines Multi-Version Concurrency Control (MVCC) techniques, which enhance parallelism and reduce contention by allowing transactions to read older versions of data.
Lecture 19: Database Logging (15-445)
This session covers the critical role of database logging in ensuring durability and atomicity, detailing write-ahead logging (WAL) and log record structures.
Lecture 20: Database Recovery (15-445)
The lecture elaborates on database recovery mechanisms, outlining how systems restore consistency and data integrity after failures using logs and checkpoints.
Lecture 21: Intro to Distributed Databases (15-445)
This introductory lecture surveys the fundamental concepts and architectures of distributed database systems, addressing challenges like data distribution and consistency in a partitioned environment.





















