{"id":31581155,"url":"https://github.com/yassenismail12/dbms-bash","last_synced_at":"2026-05-16T18:02:04.096Z","repository":{"id":315963103,"uuid":"1059267963","full_name":"Yassenismail12/DBMS-Bash","owner":"Yassenismail12","description":"This project is a command-line Database Management System (DBMS) written entirely in Bash, It simulates database functionality using the file system","archived":false,"fork":false,"pushed_at":"2025-09-21T20:54:27.000Z","size":66,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T22:26:37.336Z","etag":null,"topics":["bash-script","dbms","shell","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yassenismail12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T08:12:03.000Z","updated_at":"2025-09-18T16:20:49.000Z","dependencies_parsed_at":"2025-09-21T22:26:39.514Z","dependency_job_id":"49637507-4fe5-4891-8547-503070f05048","html_url":"https://github.com/Yassenismail12/DBMS-Bash","commit_stats":null,"previous_names":["yassenismail12/dbms-bash"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Yassenismail12/DBMS-Bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yassenismail12%2FDBMS-Bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yassenismail12%2FDBMS-Bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yassenismail12%2FDBMS-Bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yassenismail12%2FDBMS-Bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yassenismail12","download_url":"https://codeload.github.com/Yassenismail12/DBMS-Bash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yassenismail12%2FDBMS-Bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278526243,"owners_count":26001325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-script","dbms","shell","ubuntu"],"created_at":"2025-10-05T21:54:01.000Z","updated_at":"2025-10-05T21:54:04.255Z","avatar_url":"https://github.com/Yassenismail12.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bash DBMS\n\nThis project is a simple **Database Management System (DBMS)** written entirely in **Bash**.  \nIt is a command-line tool that allows you to manage databases and tables directly from your terminal.  \nDatabases are stored as directories on your file system, and tables are stored as plain text files within those directories.\n\n---\n\n## Features\n\n### Database Operations\n- Create, list, connect to, and drop databases.\n\n### Table Operations\n- Create, list, and drop tables within a connected database.\n- Define column names and data types (`int` or `str`).\n- Specify a primary key for each table to ensure data uniqueness.\n\n### Data Manipulation\n- Insert new records into a table.\n- Select and display all records from a table.\n- Delete a specific record by its row number.\n- Update an existing record's data.\n\n---\n\n## Prerequisites\nTo run this application, you will need:\n- A Unix-like operating system (e.g., Linux, macOS)\n- A Bash shell\n\n---\n\n## Installation \u0026 Usage\n\n1. Ensure all three script files (`main.bash`, `main_menu.bash`, and `db_menu.bash`) are in the same directory.  \n2. Make the scripts executable:\n   ```bash\n   chmod +x main.bash main_menu.bash db_menu.bash\n\nshow_main_menu()\n=================\n\nDisplay the Main Functions of the Datebases\n\n\n---------------------------------------------------------------------\n\nshow_database_menu()\n=================\n\nDisplay the Main Functions of tables of the connected Datebase  \n\n---------------------------------------------------------------------\n\ncreate_database()\n=================\n\n1-enter db_name\n\n2-check if database_name is empty\n\n3-if is not empty create dir\n\n4-give me massege that dir created successfully\n\n---------------------------------------------------------------------\n\nlist_databases()\n=================\n1-enter database name \n\n2-check if database_name is empty\n\n3-make variable called db_count=0\n\nloop in current_db to git directry\n\n---------------------------------------------------------------------\n\nconnect_database()\n=================\n1-enter db_name that be created in (create database)\n\n2-check it is directry\n\n3-store db_name in current_db\n\n4-when i connect to current_db:\n\n-i can create table as file\n\n-i can list mor than one table\n\n-i can insert_into_table\n\n\n-i can select from table ,deletefrom table,update\n\n5-if current_db is not exiest\n\n\n---------------------------------------------------------------------\n\n\ndrop_database()\n=================\n1-enter db_name\n\n2-if db_name is exist :give me warning that it wil be delete entire data and all date\n\n3-then delete data_base\n\n---------------------------------------------------------------------\n\n\nFunction create_table\n======================\n1-validate the name of table and ensure its existance\n\n2-get the name of the table \n\n3-get the number of columns\n\n4-validate the names of the columns and ensure their existance\n\n5- take the names and the types of date \n\n6-choose the primary key\n\n\nnote:  structure of the table '|' sepreate the columns \u003e\u003e\u003e     cloumn1_name  |    cloumn2_name  |  cloumn3_name\n\n---------------------------------------------------------------------\nFunction list_tables\n======================\n1-validate the name of table and ensure its existance\n\n2- for loop to iterate on tables in the current directory\n\n---------------------------------------------------------------------\nFunction insert_into_table\n======================\n1-validate the name of table and ensure its existance and has same name of another table or no\n\n2-display the headers of the table \n\n3take the data from user\n\n4- seprate the data of each column by delimeter '|'  \n\n5- append by \u003e\u003e  not \u003e \n\n6- validate the P.K\n\n---------------------------------------------------------------------\nFunction delete_from_table\n======================\n1-validate the name of table and ensure its existance\n\n2- display the data numbered\n\n3- choose row number to be deleted\n\n# Flow Diagrams – Bash DBMS\n\n---\n\n## 1. **System Overview**\n\n```\n+---------------------+\n|   Bash DBMS Script  |\n+----------+----------+\n           |\n           v\n+---------------------+\n|   Main Menu (User)  |\n+----------+----------+\n           |\n           v\n+---------------------+\n|  Database Menu      |\n| (when connected)    |\n+---------------------+\n```\n\n---\n\n## 2. **Main Menu Flow**\n\n```\n+----------------------+\n|      Main Menu       |\n+----------+-----------+\n           |\n    +------+------+------+------+\n    |      |      |      |      |\n    v      v      v      v      v\n Create   List   Connect  Drop  Exit\nDatabase  DBs    to DB    DB    System\n```\n\n---\n\n## 3. **Database Menu Flow**\n\n```\n+----------------------+\n|    Database Menu     |\n+----------+-----------+\n           |\n    +------+------+------+------+------+-------+------+------+\n    |      |      |      |      |      |      |      |      |\n    v      v      v      v      v      v      v      v      v\n Create   List   Drop  Insert  Select  Delete Update  Back\n Table    Tables Table   Row     Rows    Row   Row   (Main Menu)\n```\n\n---\n\n## 4. **CRUD Operations on a Table**\n\n### Create Table\n\n```\nUser --\u003e Define Table --\u003e Columns + Types --\u003e Save to file\n```\n\n### Insert Row\n\n```\nUser --\u003e Input Row --\u003e Validate Types \u0026 PK --\u003e Append to file\n```\n\n### Select From Table\n\n```\nUser --\u003e Choose Table --\u003e Display Headers + Rows\n```\n\n### Update Row\n\n```\nUser --\u003e Enter PK --\u003e Locate Row --\u003e Edit Values --\u003e Save Changes\n```\n\n### Delete Row\n\n```\nUser --\u003e Enter PK --\u003e Locate Row --\u003e Remove --\u003e Save File\n```\n\n---\n\n## 5. **Error Handling Flow**\n\n```\n        +-------------------+\n        | User Input Action |\n        +---------+---------+\n                  |\n                  v\n        +-------------------+\n        | Validation Check  |\n        +---------+---------+\n                  |\n   +--------------+----------------+\n   |                               |\n   v                               v\n Valid Input                 Invalid Input\n   |                               |\n   v                               v\n Execute Operation          Show Error Message\n   |                               |\n   v                               v\n   Done                        Return to Menu\n```\n\n---\n\n## 6. **Full System Lifecycle**\n\n```\nStart --\u003e Main Menu --\u003e [Database Ops] --\u003e Database Menu --\u003e [Table Ops]\n           |                                |\n           +------------\u003e Exit \u003c------------+\n```\n\n---\n\n### Collaborators \n\n## 1 . Yassen Mohamed Abdulhamid\n## 2 . Mostafa Mohamed Abdullatif \n## 3 . Abdulrahman Rafat Ahmed\n## 4 . Ahmed Atef Swefy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassenismail12%2Fdbms-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyassenismail12%2Fdbms-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassenismail12%2Fdbms-bash/lists"}