Perfect π β hereβs your enhanced and GitHub-optimized README.md version with badges, emoji styling, and aesthetic Markdown formatting. Itβs clean, professional, and eye-catching for both GitHub and LinkedIn posts π
This project is a mini Database Management System (DBMS) built entirely with pure Bash scripting β no SQL engines, no databases, just shell logic. It simulates core DBMS functionality like creating databases, tables, inserting, selecting, updating, and deleting rows β all stored as simple text files in your filesystem.
π‘ Think of it as SQL without SQL β powered only by Linux commands.
- π Create Database β Initialize a new database.
- π List Databases β Display all existing databases.
- π Connect To Database β Access and manage tables interactively.
- ποΈ Drop Database β Permanently remove a database.
- ποΈ Create Table β Define columns, datatypes (
int
/string
), and a primary key. - π List Tables β Show all tables inside a database.
- 𧨠Drop Table β Remove a specific table.
- β Insert Row β Add a new row with data-type and primary key validation.
- π Select Rows β View all rows in a formatted table output.
- β Delete Row β Delete specific rows by their index number.
- βοΈ Update Row β Modify values in a specific column with type checking.
ποΈ Every database is a directory inside the Databases/
folder. π Each table is a text file containing its schema and rows.
Example table file:
Columns:id,name,age Types:int,string,int PK:id 1,John,25 2,Jane,30
Operations like insert, update, and delete are performed using awk
, sed
, and other core Bash tools to ensure proper schema enforcement and data integrity.
. βββ dbms.sh # Main entry point (menu system) βββ lib/ β βββ db_operations.sh # Database operations (create, list, drop, connect) β βββ table_operations.sh# Table operations (CRUD for data) βββ Databases/ # Auto-created folder for all user databases
Before running, make sure you have:
- π§ Linux / macOS / WSL on Windows
- π‘ Bash v4+
- π§± Utilities:
awk
,sed
,wc
,nl
,mkdir
,rm
π§ Run
bash --version
to check your version.
git clone https://github.com/yourusername/dbms-bash.git cd dbms-bash
chmod +x dbms.sh
./dbms.sh
Example:
1) Create Database 2) List Database 3) Connect To Database 4) Drop Database 5) Exit
Creating and managing data inside your own DBMS:
Enter your choice: 1) Create Database #? 1 Enter database name: mydb Database 'mydb' created. #? 3 Enter database name to connect: mydb Connected to database 'mydb'. # Inside table menu: 1) Create Table 2) Insert Row 3) Select Rows
β
Example Select Rows
Output:
Row | id | name | age ------------------------------------------------ 1 | 1 | John | 25 2 | 2 | Jane | 30 ------------------------------------------------
Concept | Description |
---|---|
π§ awk | Print and format tabular data |
βοΈ sed | Inline editing for update operations |
π IFS | Parse comma-separated schema |
π§© Arrays | Store column names and datatypes |
π§± Regex | Validate integer and string data |
π select | Interactive CLI menus |
π§Ό mktemp | Safe atomic updates using temp files |
Through this project, youβll learn:
- How databases work at the filesystem level.
- How to implement CRUD operations with shell scripting.
- Real-world use of awk, sed, regex, and array manipulation.
- The importance of validation, schemas, and primary keys.
π§ A perfect learning project for students exploring DevOps, Linux, or backend fundamentals.
This project is licensed under the MIT License. Youβre free to use, modify, and distribute it for learning or demo purposes.
Built with β€οΈ using pure Bash to explore how DBMS concepts work under the hood β from schemas and records to data integrity and CRUD logic.
π βUnderstanding how data is stored and managed is the first step to mastering backend systems.β