VanillaDB is an academic project developed by National Tsing Hua University starting from 2016. This project is launched for teaching and researching purpose, because most relational database systems nowadays conduct too many optimizations and are too complicated to understand for beginners. VanillaDB can also be used for database researchers to test their new algorithms.
As yet, VanillaDB has became the testbed for some research work, teaching project for some database courses, and the core engine for some advanced database systems like ElaSQL.
Two-Phase Locking (Deadlock Detection)
VanillaDB allows several transactions running in parallel under control of strict two-phase locking protocol in multiple granularities: file, block and record. To cope with deadlocks, VanillaDB supports time-limit deadlock detection, which forces transactions to rollback when they wait too long for a lock.
Read Committed Serializable Repeatable Read
VanillaDB supports transactions at different isolation levels concurrently, each transaction can specify its isolation level at creation time and the default transaction level is Serializable.
Nested Loop Join Index Nested Loop Join
VanillaDB only supports implicit joins in the FROM clause with Nested Loop Join, but it can also determine the join field in the WHERE clause to perform an Index Nested Loop Join.
Tuple-at-a-Time Model Materialized Model
VanillaDB supports both pipelined (iterative) and materialized scanning. Specially, materialized scanning is used in ORDER BY and GROUP BY. When creating a query plan, VanillaDB estimates the cost of scanning trees and chooses the best one.
Custom API SQL Stored Procedures
VanillaDB offers various query interfaces, such as SQL, JDBC, stored procedures, and native query interfaces.
N-ary Storage Model (Row/Record)
VanillaDB uses row-oriented store to store records, which means all fields inside a record are stored contiguously. Records cannot span more than one page, and each page with records is organized as the slotted page.
VanillaDB stores databases as several files in existing file system, managed by the storage engine. Databases are separated into different directories, and each table with catalog and index information is a file under the database directory.
The storage engine offers both file-level interface and block-level interface to access the data. It also implements two types of I/O mode that can be configured by users, including Java New I/O and Jaydio (direct I/O, Linux only).
https://github.com/vanilladb/vanillacore
National Tsing Hua University
2016