Anton is a lightweight SQL-like database written in Java. It is developed as a learning project to understand the internal mechanisms of database management systems, including query parsing, execution, and storage management.
The current implementation supports the following operations:
- Data Definition Language (DDL):
CREATE TABLE: Define tables with schemas including column names and data types.DROP TABLE: Remove existing tables and their associated data.
- Data Manipulation Language (DML):
INSERT INTO: Insert new records into tables.SELECT: Retrieve records. Supports selecting specific columns or all columns (*), and basic conditional filtering using theWHEREclause.DELETE: Remove records based on conditional filters using theWHEREclause.
- Query Processing: Includes a custom parser and execution engine for a subset of SQL.
- Indexing: Utilizes B+ Trees for efficient data retrieval and record lookups.
- Storage Management: Handles basic file I/O, page management, and record serialization.
- Advanced filtering mechanisms
- Query result caching
UPDATEstatements with conditional filtering- Basic transaction support (commit and rollback)
- Table joins
Start the database engine and interact with it using standard SQL-like syntax:
CREATE TABLE users ('id' INT, 'name' STRING)
INSERT INTO users VALUES ('id' 1, 'name' 'Alice')
SELECT * FROM users
SELECT id, name FROM users WHERE id=1
DELETE FROM users WHERE id=1
DROP TABLE usersThis project is built for educational purposes and is not intended for production environments.
This project is licensed under the MIT License.