An open API service indexing awesome lists of open source software.

https://github.com/jeninsutradhar/hexadb

An AI-powered in-memory relational database system that supports SQL-like operations, enhanced with AI-based natural language processing
https://github.com/jeninsutradhar/hexadb

ai-powered database db json natural-language-processing nlp sql

Last synced: 6 months ago
JSON representation

An AI-powered in-memory relational database system that supports SQL-like operations, enhanced with AI-based natural language processing

Awesome Lists containing this project

README

          


logo

A very simple and Fast **in-memory** database implemented in **C++**.

## Description

HexaDB is a basic command-line database system that supports creating tables, inserting, selecting, updating, and deleting rows. It also supports indexing and saving/loading databases to/from files.

## Compilation and Running

To compile and run the code, you'll need a C++ compiler that supports C++17 (or later). g++ is recommended.

```bash
g++ -o hexadb main -std=c++17
./hexadb
```

# Architecture
![Architecture of HexaDB - visual selection](https://github.com/user-attachments/assets/8c2fb406-8bbc-424c-a732-2d4abcaae504)

## Features

* **Tables:** Create and manage tables with columns of type INT, TEXT, or REAL.
* **CRUD Operations:** Supports INSERT, SELECT, UPDATE, and DELETE operations with basic WHERE clause filtering.
* **Indexing:** Create indexes on columns to potentially speed up queries.
* **Persistence:** Save and load databases to/from files.
* **SQL:** Interact with the database using SQL-like commands.

## Example Usage

```sql
CREATE TABLE users (id INT, name TEXT, age INT);
INSERT INTO users (id, name, age) VALUES (1, 'Alice', 30);
INSERT INTO users (id, name, age) VALUES (2, 'Bob', 25);
SELECT * FROM users;
SELECT name, age FROM users WHERE age > 28;
UPDATE users SET age = 31 WHERE name = 'Alice';
DELETE FROM users WHERE id = 2;
PRINT TABLE users;
SAVE DB my_database.data
LOAD DB my_database.data
```

Type `help` in the HexaDB terminal for a list of commands. Type `exit` to quit.