Skip to content

B23BB1024/mini-dbms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—„οΈ Mini Relational DBMS in C++

A lightweight, file-based SQL engine built from scratch using C++. Supports core relational database operations including JOINs, conditional filters, indexing, and persistence.


βœ… Features

  • CREATE TABLE name (col TYPE [PRIMARY KEY], ...)
  • INSERT INTO name VALUES (...)
  • SELECT * FROM name
  • DELETE FROM name WHERE col = val
  • UPDATE name SET col = val WHERE col = val
  • DROP TABLE name
  • EXPORT TABLE name
  • SHOW TABLES
  • SHOW COLUMNS FROM name
  • TRUNCATE TABLE name
  • CREATE INDEX ON name col
  • FIND FROM name WHERE col = val (uses index)
  • JOIN t1 AND t2 ON t1.col = t2.col
  • JOIN ... WHERE t2.col = val
  • EXPORT JOINED TO filename.table
  • EXIT with unsaved export reminder
  • transaction.log replay support

πŸ—οΈ How It Works

  • All tables are stored as .table files (CSV-style)
  • Each command is parsed using C++ stringstream
  • Primary key constraints and type checking are enforced
  • JOIN results are stored in-memory and exportable
  • On startup, all .table files are auto-loaded and transactions are replayed

πŸš€ Getting Started

βœ… Compile:

With g++:

g++ src/main.cpp src/Table.cpp -o dbms
./dbms

About

a simple mini DBMS built in C++ with file persistence, indexing, transactions, and JOIN support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages