A lightweight Database Management System built entirely with Bash scripting. This project simulates core DBMS features using the Linux file system and text processing tools (awk, sed, grep).
- Create Database
- List Databases
- Drop Database (with confirmation)
- Connect to Database
- Create Table (with metadata)
- List Tables
- Drop Table (confirmation included)
- Insert into Table
- Select from Table
- Update Table (Primary Key enforced)
- Delete From Table (by PK or any column)
- Delete All Rows (keeps table & metadata)
- Metadata-driven schema
- Primary Key validation & uniqueness
- Data type validation (int / string)
- Menu-driven CLI
- Safe file handling using temp files
- Confirmation prompts for destructive actions
DBMS_Project/
│
├── dbms.sh # Main entry point (Screen 1)
├── databases/
│ └── <database_name>/
│ ├── table1
│ ├── table1_metadata
│ ├── table2
│ └── table2_metadata
│
├── Screen1/
│ ├── create_database.sh
│ ├── list_databases.sh
│ ├── drop_database.sh
│ └── connect_database.sh
│
├── Screen2/
│ ├── Create_Table.sh
│ ├── List_Tables.sh
│ ├── Drop_Table.sh
│ ├── Insert_Table.sh
│ ├── Select_Table.sh
│ ├── Update_Table.sh
│ └── Delete_From_Table.sh
│
└── README.md
chmod +x dbms.sh
./dbms.sh
⚠️ Make sure you're running on Linux / Unix environment.
- Run
./dbms.sh - Create a database
- Connect to the database
- Create tables with schema
- Insert / Select / Update / Delete records
- Confirmation before deleting databases or tables
- Unique PK checks during insert & update
- Prevents invalid data types
Ahmed Yasser and Shahd Ramadan
ITI – Bash DBMS Project
Built with passion, coffee ☕, and lots of debugging 😄
Give the repo a ⭐ and feel free to fork & enhance it!