This project implements a basic Database Management System (DBMS) using Bash scripts, developed as part of the ITI (Information Technology Institute) training program. It provides a command-line interface with SQL-like syntax for database operations, featuring colorful output and interactive elements powered by Charm's Gum library.
- Create and drop databases
- List all databases
- Connect to and disconnect from databases
- Switch between databases
- Create tables with typed columns (INT, FLOAT, BOOL, STRING)
- Define primary keys
- Drop tables
- List all tables in a database
- Insert rows with type validation
- Select data with column filtering
- Update existing records with WHERE conditions
- Delete rows with WHERE conditions
- Support for various comparison operators (
=,!=,<,>,<=,>=)
- Bash shell environment
- Root/sudo access for installation
- Internet connection for installing dependencies
-
Clone the repository:
git clone https://github.com/PyMustafa/bash-DBMS-project.git cd bash-DBMS-project -
Make the installation script executable:
chmod +x install.sh
-
Run the installation script:
sudo ./install.sh
Alternatively, you can run it directly with bash:
sudo bash install.shIf you prefer to review the installation process:
- Download the install script
- Review its contents
- Make it executable and run it after confirming it's safe
-
Start the DBMS using either method:
./core.sh # Preferred method (requires execute permissions) bash core.sh # Alternate method if needed
-
Use SQL-like commands to interact with the system:
CREATE DATABASE dbname DROP DATABASE dbname USE dbname LIST DB
CREATE TABLE tablename col1(type) col2(type) ... DROP TABLE tablename SHOW TABLES
INSERT INTO tablename VALUES value1 value2 ... SELECT column1 column2 FROM tablename [WHERE condition] SELECT ALL FROM tablename [WHERE condition] UPDATE tablename SET column = value WHERE condition DELETE FROM tablename WHERE condition
-help -- Show help menu clear -- Clear screen exit -- Exit the program
INT: Integer valuesFLOAT: Decimal numbersSTRING: Text valuesBOOL: true/false values
- The system performs type checking and validation on all inputs
- Table and database names are sanitized
- Reserved keywords are protected
- Primary key constraints are enforced
Feel free to submit issues and enhancement requests!
This project is open-source and available under the MIT License.