This is a File-Based Database Management System (DBMS) meticulously crafted entirely using Bash Shell Script. It offers a robust and interactive Command Line Interface (CLI) for performing fundamental database and table operations (CRUD).
This project demonstrates the power of Bash scripting to create complex, functional applications, utilizing core Linux utilities like awk, sed, grep, and column for data manipulation and presentation.
- Database Management: Create, List, Connect to, and Drop databases. Databases are stored as directories under the
Databasesroot folder. - Table Management (DDL): Create new tables by defining columns, List all tables, and Drop existing tables.
- Data Manipulation (DML - CRUD):
- Insert: Insert new records into a table.
- Select: Display all data from a table in a clean, formatted manner using the
column -tutility. - Delete: Delete records based on a specified column value (WHERE condition).
- Update: Update specific fields in records based on a condition (SET/WHERE logic).
- CLI Interface: User-friendly menus for seamless navigation.
You need a Linux or Unix-like environment (e.g., Ubuntu, macOS, WSL) with Bash installed. The project relies on standard utilities like awk, column, ls, and mktemp.
-
Clone the Repository:
git clone [https://github.com/ahmed-hashim2024/bash-dbms.git](https://github.com/ahmed-hashim2024/bash-dbms.git) # Replace with the actual link cd bash-dbms
-
Make the script Executable:
chmod +x dbms.sh # Assuming the script file is named dbms.sh -
Run the DBMS:
./dbms.sh
Databases are stored as directories, and tables are stored as plain files within them.
.
βββ Databases/
β βββ UserDB/
β β βββ Profiles # Table file (Data stored with '|' delimiter)
β β βββ Orders # Table file
β βββ MarketingDB/
β βββ Campaigns # Table file
βββ dbms.sh # The main Bash script
βββ README.md