Skip to content

A simple database management system (DBMS) built entirely with Bash shell scripting. This project allows users to create, list, connect to, and drop databases and tables directly from the command line, using the file system as the storage backend.

Notifications You must be signed in to change notification settings

ahmed-hashim2024/Bash-DBMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Bash Shell Script DBMS 🐚
Simple File-Based Database Management System

Typing SVG

πŸš€ Project Overview

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.

✨ Key Features

  • Database Management: Create, List, Connect to, and Drop databases. Databases are stored as directories under the Databases root 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 -t utility.
    • 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.

πŸ› οΈ Getting Started

Prerequisites

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.

Installation and Execution

  1. 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
  2. Make the script Executable:

    chmod +x dbms.sh # Assuming the script file is named dbms.sh
  3. Run the DBMS:

    ./dbms.sh

πŸ“‚ Project Structure (File-Based Storage)

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

About

A simple database management system (DBMS) built entirely with Bash shell scripting. This project allows users to create, list, connect to, and drop databases and tables directly from the command line, using the file system as the storage backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages