Lecture Demos

Interactive visualizations for class by : open one and step through it.

Database Systems (DBMS) 6 demos

How a database stores, finds and plans access to data.

Database Indexing

Why queries are slow: table pages must travel from disk into RAM. Race a full table scan against an index lookup and watch disk reads, RAM checks and time on a live scoreboard.

DatabasesIndexingDisk & RAM

Hashing

Four modes: a hash table with chaining or open addressing (linear, quadratic, double hashing, rehashing), a static hash index on disk with overflow pages and range queries, extendible hashing with directory doubling, and linear hashing with round-robin splits.

Data structuresDatabasesHashing

Query Optimizer

Type any SQL query and watch it become a plan: the parser builds the query tree, the rewriter (RBO) applies rules like predicate pushdown, and the planner (CBO) uses statistics and costs to pick access paths, join order and join methods.

DatabasesQuery processingRBO & CBO

Table Joins

Nested loop, index nested loop, hash join and merge join side by side: watch every comparison light up a matrix of all row pairs, and compare the work on a live scoreboard.

DatabasesJoinsIndexes

Index Types

Clustered vs non-clustered, dense vs sparse, and specialised indexes — bitmap, GIN, GiST and BRIN — each walked through with a query that shows what it skips and what it costs.

DatabasesIndexingPostgreSQL

Recursive CTE

WITH RECURSIVE built round by round: the anchor runs once, then the recursive part feeds on the working table until nothing new appears. Watch the result grow on an org chart and on flight routes, and see why a cycle needs UNION.

DatabasesSQLRecursion

Data Structures & Algorithms 3 demos

Core structures and the classic algorithms that work on them.