This repository, VanillaCore, is the core engine of VanillaDB, a single-node, multi-threaded, relational database engine designed for educational purposes. It partially supports the SQL-92 standard and provides database connectivity through JDBC, embedded usage, or Java-based stored procedures.
Here’s an overview of what it does and its key features:
Purpose
- VanillaCore is a lightweight database engine meant for teaching database systems and exploring database internals.
- It supports basic SQL operations and is implemented with simplicity in mind, making it ideal for learning and experimentation.
Key Features
-
SQL Support:
- Supports basic SQL features (select, from, where, group by, order by, etc.).
- Implements a subset of the SQL-92 standard with some restrictions (e.g., no null values, limited joins, no
* in SELECT).
- Includes support for basic aggregation functions, arithmetic expressions in updates, and custom indexing.
-
Database Connectivity:
- Provides a JDBC interface for external connections.
- Includes a basic SQL console for direct interaction with the database.
-
Custom Configurations:
- Configurable settings for file storage, buffer pool size, and checkpointing via a
vanilladb.properties file.
-
Educational Resources:
- Offers detailed educational slides explaining database architecture, query processing, storage, transaction management, concurrency, and recovery.
- Includes tutorials for getting started with the system and its architecture.
-
Performance Enhancements:
- Implements a buffer pool for efficient data storage and retrieval.
- Includes concurrency control mechanisms like strict Two-Phase Locking (S2PL) and recovery techniques based on ARIES.
How It Works
- Startup: The database engine starts with a command-line interface and creates a directory for database files.
- Query Execution: SQL queries are processed through an interpreter or JDBC client, with support for basic query optimization.
- Storage: Data is stored in files with configurable block sizes, and a buffer manager caches data for performance.
- Transactions: VanillaCore supports transactions with locking and checkpointing mechanisms.
Technical Highlights
- Maven-Based Build:
- The project uses Maven for dependency management and building, with Java 17 as the target runtime.
- Testing:
- Offers JUnit-based test suites to ensure functionality.
- Tests can be executed with Maven or directly in IDEs like Eclipse.
Use Cases
- Teaching Tool: Designed for students and educators to understand the internals of relational databases.
- Prototyping: Can be used to experiment with database features like query optimization, indexing, and transaction management.
- Learning Platform: A sandbox for learning database design, architecture, and storage mechanisms.
Development and Contribution
- Open Source: Licensed under Apache 2.0, allowing free use and modification.
- Community Contributions:
- Contributions are encouraged via pull requests.
- Issues for bugs or feature requests can be submitted on GitHub.
- Release Notes:
- Detailed release notes provide information about updates, bug fixes, and new features for each version.
Getting Started
- Requirements:
- Java Development Kit (JDK 1.7 or newer).
- [Redacted Person] for building the project.
- Setup:
- Compile the source code using
mvn package.
- Start the server with
java -classpath core-0.7.0.jar org.vanilladb.core.server.StartUp {DB Name}.
- SQL Console:
- Launch the console with
java -classpath core-0.7.0.jar org.vanilladb.core.util.ConsoleSQLInterpreter.
Additional Resources
- Documentation: Includes a detailed README, contributing guide, release notes, and a SQL syntax reference.
- Educational Slides: Comprehensive slides outline the database's architecture and key components.
VanillaCore is a simple yet powerful tool for learning about relational databases, making it an excellent resource for students, educators, and developers interested in database internals.