PebbleDB is a simple,lightweight modular database being built in Go. It provides a SQL-like interface,an in-memory engine,and disk persistence via pages.
Warning
PebbleDB is a WIP
Most aspects of the project are under heavy development and no stable release is present as of yet.
- SQL-like REPL: SQL-like command parsing and execution
- Engine Abstraction : Engine handles orchestration between parser, executor, and storage.
- Binary Persistence : Data persists to disk in Binary format.
- Page Management : Introduced fixed-size 4KB page abstraction.
- Test Coverage : Initial unit tests for core DB operations.
- Go 1.20+ installed on your machine.
-
Clone the repository:
git clone https://github.com/AltSumpreme/pebbledb.git cd pebbledb -
Build and run the project:
go run cmd/main.go
Once the application is running, you can interact with it via the command line.
- CREATE:
CREATE TABLE table_name column_name:column type- INSERT
INSERT TO TABLE table_name (col1,col2) FROM VALUES (val1,val2)- SELECT
-To Select ALL Columns
SELECT * FROM table_name- Select Specific Columns
SELECT col1,col2 FROM table_name- DROP
DROP TABLE table_name- EXIT: Exit the database.
- Persistence Layer: Add the ability to persist data
- WAL: Adding WAL and it support to the later releases
- Concurrency Support: Add support for concurrent access with read-write locks.
- Additional Commands: Implement
UPDATEandLISTcommands. - Data Types: Support storing complex data types like arrays and structs.
- Performance Optimization: Improve memory usage and introduce indexing.
- CLI Enhancements: Add interactive mode and command history.
- Error Handling: Enhance error handling for graceful recovery.
- Testing and Documentation: Add unit tests and comprehensive documentation.
cd testing
go test
For more verbose output
go test -v