ANDB is a relational database management system (RDBMS) designed to handle complex queries and manage data efficiently. It features an SQL parser and uses B+ trees for indexing to ensure fast data retrieval and organization.
Relational Database Management: Organize and manage data in a structured, tabular format. SQL Parser: Parse and execute SQL statements for querying and manipulating data. B+ Tree Indexes: Utilize B+ trees for efficient indexing and fast data access. Thread Management: Handle multiple queries and operations simultaneously with a multi-threaded architecture.
C++11 or later CMake (for building the project) Basic understanding of SQL and relational databases
Clone the Repository:
git clone https://github.com/yourusername/MyRelationalDB.git
cd andb
Build the Project:
mkdir build
cmake -B build -S .
cmake --build ./build
./build/andb-daemon
Open new terminal
./build/andb-cli
CONNECT <database_name>
Connects to the specified database. Creates the database if it does not exist.
EXIT
Terminates the current session
CREATE TABLE new (name STRING , age INT, salary INT)
INSERT INTO new VALUES("key1" , 10 , 5000)
INSERT INTO new VALUES("key2" , 20 , 2000)
INSERT INTO new VALUES("key3" , 30 , 3000)
SELECT * FROM new
UPDATE new SET salary = 1111, age = 11111 WHERE name = "key1"
DELETE FROM new WHERE name = "key1"
BEGIN
INSERT INTO new VALUES("key4" , 40 , 4000)
COMMIT
BEGIN
INSERT INTO new VALUES("key5" , 50 , 5000)
ROLLBACK
SQL Parser : Handles the parsing and execution of SQL queries.
B+ Tree Indexing : Provides efficient indexing and quick access to data.
Daemon Service : Runs in the background to handle database operations.
CLI Tool : Provides a command-line interface to interact with the database.