🗄️ How Databases Work
Learn how indexes find rows, planners choose query strategies, transactions coordinate changes, and write-ahead logs make recovery possible.
What you’ll learn
- Finding RowsExplain how indexes and query planning reduce the work needed to find rows.Tables, indexes, B-trees, statistics, column order, and query plans shape the path from a query to its rows.
- One Change at a TimeDescribe transactions, isolation, MVCC, locks, and deadlock handling.Transactions define reliable work while concurrency control manages what overlapping transactions can see and change.
- Writing AheadExplain how write-ahead logging supports durable commits and log recycling.The database records changes before flushing data pages, creating an ordered recovery history.
- Recovering After a CrashConnect checkpoints, replay, commit status, and durability settings to crash recovery.Recovery uses the log and its boundaries to restore committed work and define what a durability promise covers.
Questions this course answers
Why might a database choose a full table scan even when an index exists?
An index helps most for selective access. If many rows are needed, visiting the index and then the table can cost more than reading the table sequentially.
What does atomicity mean for a transaction?
Atomicity makes a defined unit of work all-or-nothing from the database's perspective.
Why must a WAL record be durable before its changed data page is written?
The log gives recovery a durable record of changes that may not yet have reached the table or index pages.
Grounded in trusted sources
- https://www.postgresql.org/docs/current/indexes.html
- https://www.postgresql.org/docs/current/transaction-iso.html
- https://www.postgresql.org/docs/16/wal-intro.html
- https://www.postgresql.org/docs/18/wal-configuration.html
- https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-model.html
- https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_INNODB_REDO_LOG.html
Every Wunder lesson is built from real, reputable sources — never invented.
Related Technology courses
Wunder is a personalized learn-anything platform — tell it any topic and it builds a beautiful, fact-checked course in minutes, with narration, a knowledge check, and a college-style University track.
Browse more Technology courses · All topics · Home
© 2026 Wunder Learning LLC · Terms & Privacy