SimpleDB
Database coursework · teaching framework · 2023
A Java database course project with query operators, a buffer pool, page locks, and transaction handling. The code makes the storage work behind a query visible.
Coursework built on a teaching framework. The repository includes tests; they have not been rerun for this page.
View repositoryInside the buffer pool
Conceptual cache example. The default page size in BufferPool is 4 KiB.
Two ways to finish
Commit writes dirty pages; abort restores pages from disk. Both release locks.
Below a query
A conceptual operator tree showing how a query reaches stored pages.
Implementation notes
The buffer pool sits between queries and disk.
BufferPool retrieves a page from its cache or reads it from the underlying file. When the configured pool is full, it evicts a page before admitting another. Page IDs and transaction permissions are explicit inputs.
Commit and abort take different paths.
The implementation acquires locks before returning pages. A commit flushes the transaction's dirty pages; an abort restores its pages from disk. Both paths then release the transaction's locks.
Coursework with concrete implementation details.
This repository includes a teaching framework and tests for operators, pages, writes, and deadlocks. It is a course implementation. The test suite has not been rerun for this case study, so no passing-test or throughput figure is attached.