Skip to content

Magdi888/DBMS

Repository files navigation

DBMS-Using-Bash-Shell-Scripting

The Team

Ahmed Rizk, Ahmed Magdi

Please feel free to communicate with us in anytime :)

More about the project

In this project we are trying to demonstrate some core features in bash scripting such as:

  • sourcing in bash
  • awk in bash
  • sed in bash

Before you run

  • Make sure to set the project path in .bashrc
export PATH=$PATH:/"project_path_inside_your_machine"
  • Make sure that all files has the execution premission

To run the project

  • In your local terminal type the following:
MainMenu.sh

Structure of DBMS Engine

Basically there are two levels:

  • Upperlayer level
  • Database level
  • Table level

Structure in Details

First, the engine will create a directory Called "DB" and this is the upper layer directory which will store database directories. Second, the database directories which will contains the tables. Third, the tables level, in every table creation in DBMS, the engine will actually create two files:

  • MetaData file
  • Data file

MetaData file:

  • It represents table schema informations like (column names, type of that column(String, Integer), which column is the primary key)

Data file:

  • It represents the actual data stored by you

Note:

In this engine we offer one primary key for every single table, composite primary keys are not yet available

Inside the engine

  • You will have two menus

Database Menu

Create Database Create a directory to store tables
Connect to Database Once you type the database name, system will check if database's dirctory is existed or not, if it is there, engine will enter to the table menu
Show Databases Simply display all Database directories
Drop Database In case you want to remove a specific Database, once you type the database name it removes its directory
Exit A Safe exit from the engine

Table Menu

Create New Table Create a new table inside the existing database directory
List Tables Simply display all tables names
Drop Table In case you want to remove an existing table, once you type the database name it removes its directory
Insert Into Table Just like any database engine if you want to add new record to the table, you just specify all values base on table schema
Select From Table you have multiple options in case you want to see the data (1- All records 2-Specific Column 3-Specifc Column 4-With Condition
Delete From Table delete a record inside a specific table based on a column value
Update Table Edit any record based on any column and set the new value
Exit A Safe exit from the table menu and get back to database menu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages