{"id":20218113,"url":"https://github.com/dina-hosny/dbms-simulator-using-bash-scripting","last_synced_at":"2026-04-14T06:02:15.131Z","repository":{"id":134424146,"uuid":"591635665","full_name":"Dina-Hosny/DBMS-simulator-using-BASH-scripting","owner":"Dina-Hosny","description":"A bash project that simulate the MySQL database","archived":false,"fork":false,"pushed_at":"2023-01-21T13:33:26.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T22:26:49.397Z","etag":null,"topics":["bash","bash-script","bash-scripting","database","database-management","linux","mysql","mysql-database"],"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/Dina-Hosny.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}},"created_at":"2023-01-21T11:12:53.000Z","updated_at":"2023-02-17T13:28:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"c30bd665-b682-46d1-b94b-cb191378f083","html_url":"https://github.com/Dina-Hosny/DBMS-simulator-using-BASH-scripting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dina-Hosny%2FDBMS-simulator-using-BASH-scripting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dina-Hosny%2FDBMS-simulator-using-BASH-scripting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dina-Hosny%2FDBMS-simulator-using-BASH-scripting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dina-Hosny%2FDBMS-simulator-using-BASH-scripting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dina-Hosny","download_url":"https://codeload.github.com/Dina-Hosny/DBMS-simulator-using-BASH-scripting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241655110,"owners_count":19997988,"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","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","bash-script","bash-scripting","database","database-management","linux","mysql","mysql-database"],"created_at":"2024-11-14T06:37:15.835Z","updated_at":"2025-12-30T21:07:30.455Z","avatar_url":"https://github.com/Dina-Hosny.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DBMS-simulator-using-BASH-scripting\n\nThe project’s purpose is to build a Database Management System with its tasks using Bash Scripting.\n\n## Project Discription:\n\nA bash project that simulate the MySQL database and do the following:\nWhen A user run it the screen will be cleared and ask for the below entry and need to be selected by it’s number Each one will run a specific script.\n- Create Database user.\n- Delete Database User.\n- Create new Database.\n- Delete an existing Database.\n- Create A new Table inside Database\n- Insert A New Row in a Table\n- Select Data from Table\n\n## Project Steps:\n\nThe Project will be under Directory Called ```MySQL```.\n\nThere will be a main script called ```MySQL/main.sh```.\n\n### 1) Create Database user\n- By default, will be a system user called “oracle”\n- If the user that run the script is “oracle” or an admin user then he can do the following:\n  - Will Ask you for a new admin user.\n  - If this user already exists MSG will appear that tells the user is already exist.\n  - If not, the entered user will be in a file called ```DB_admins.db```.\n  - DB_admins.db will have a list of admin users, including oracle and other created users.\n  \n### 2) Delete Database User\n- Only users in DB_admins.db can run this script.\n- The Script will show you the list of users in ```DB_admins.db```.\n- If one is selected then it will be deleted from ```DB_admins.db```.\n\n### 3) Create new Database\n- Only users in ```DB_admins.db``` can run this script.\n- The script will ask you for database name.\n- Then A Directory is created with the entered DB name under the Following Path: ```MySQL/DataBases/YOUR_NEW_DB```.\n- A file will be in this path called ```owner.txt``` will have the user name for the user that create this database.\n- The final output for this script is a directory with DataBase Name.\n```bash\n  MySQL/DataBases/EmplyeeDB\n```\n\n### 4) Delete an existing Database\n- Only users in ```DB_admins.db``` can run this script.\n- The script will show all available created Databases inside ```MySQL/DataBases```\n- If the Database owner is the same with the user that run this script, then Database directory and it’s content be deleted.\n```bash\n  if EmplyeeDB is selected directory and it’s content be deleted.\n```\n\n### 5) Create A new Table inside Database\n- Only users in ```DB_admins.db``` can run this script.\n- The script will show all available created Databases inside ```MySQL/DataBases```.\n- If the Database owner is the same with the user that run this script, then will ask you for Table Name, Number of columns need to be created.\n- If Table Name not already exist inside this Database then will ask you to enter the Column Names according to the entered number of columns.\n- The final output for this script must create a file named with the entered Table Name.\n```bash\nMySQL/DataBases/EmplyeeDB/employee.table:\n#cat employee.table\nemp_id,emp_name,job_name,manager_id,hire_date\n```\n- Each Column name is separated by comma.\n\n### 6) Insert A New Row in a Table\n- Only users in ```DB_admins.db``` can run this script.\n- The script will show all available created Databases inside ```MySQL/DataBases``` to select your working database.\n- If the selected Database owner is the same with the user that run this script, then will show all available tables inside this database to select from it.\n- For the selected Table The script will start reading the table header then will ask you to enter these data.\n- First column must be always unique.\n\n### 7) Select Data from Table\n- The script will show all available created Databases inside ```MySQL/DataBases``` to select your working database.\n- Then will show all available tables inside this database to select from it.\n- Now you will have two options:\n    - Show The content of the selected table will be shown by cat this table name.\n    ```bash\n    #cat employee.table\n    emp_id,emp_name,job_name,hire_year\n    1,Mohamed,unix admin,2021\n    2,Ahmed,unix admin,2016\n    3,Ahmed,DBA,2019\n    ```\n    - Search inside table take a string then show you the rows that have this string.\n\n### 8) Delete Row from Table\n- From the selected table each row the contain a specific string must be deleted.\n- Then show you the updated table.\n\n\n## Tools and Technologies:\n- Bash/Shell Scripting.\n- Linux RedHat.\n- PuTTY.\n- Virtual Machines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdina-hosny%2Fdbms-simulator-using-bash-scripting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdina-hosny%2Fdbms-simulator-using-bash-scripting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdina-hosny%2Fdbms-simulator-using-bash-scripting/lists"}