ZeroKDB is a lightweight, file-based database system with support for basic SQL operations and vector similarity search. It is designed to be simple and easy to use, making it ideal for small projects or educational purposes.
- Create, insert, and query tables using SQL-like syntax.
- Support for various data types including strings, integers, floats, booleans, datetimes, and lists of floats.
- Perform cosine similarity searches on vector data.
- File-based storage with optional IPFS support for distributed storage.
- Change tracking for database operations.
To install the necessary dependencies using Poetry, use the following command:
poetry install
To create a table, use the CREATE TABLE
command:
CREATE TABLE users (id int, name string)
To insert data into a table, use the INSERT INTO
command:
INSERT INTO users (id, name) VALUES (1, 'Alice')
To query data from a table, use the SELECT
command:
SELECT * FROM users
To perform a cosine similarity search on vector data, use the COSINE SIMILARITY
clause:
SELECT id FROM vectors COSINE SIMILARITY embedding WITH [0.1, 0.2, 0.3]
To limit the number of results returned, use the LIMIT
clause:
SELECT * FROM users LIMIT 10
To run the tests, use the following command:
pytest tests/
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.