FnckSQL is a lightweight, LSM KV-based SQL Database Management System (DBMS) created by individual developers as a hobby project. The core objective of FnckSQL is to demonstrate that anyone can write a database, even if the primary author cannot find a job in the industry. The project name and its irreverent tone reflect this sentiment, symbolizing a defiant stance toward the "beautiful" database industry.
FnckSQL offers a variety of features typically found in more mature SQL databases, including:
FnckSQL utilizes a Log-Structured Merge (LSM) tree as its storage engine, providing efficient write performance and supporting high throughput for database operations.
FnckSQL supports a comprehensive SQL interface with capabilities such as projections, filters, joins, aggregates, and transactions. This makes it a fully functional SQL database, suitable for learning and experimentation.
FnckSQL includes Object-Relational Mapping (ORM) features, enabling the use of Rust structs directly within the database:
Developers can create user-defined functions to extend the functionality of the database:
FnckSQL features both a Rule-Based Optimizer (RBO) and a Cost-Based Optimizer (CBO). For execution, it uses the Volcano model and supports LuaJIT for code generation.
FnckSQL implements Multi-Version Concurrency Control (MVCC) with support for optimistic transactions, ensuring data consistency and isolation across multiple transactions.
FnckSQL supports various index types, including primary, unique, normal, and composite indexes. It also offers a full range of SQL query capabilities, such as:
FnckSQL provides Docker images for easy deployment:
To build from source:
To run the Docker container: