Skip to content

CLI based tool to perform CRUD operations with databases and tables

Notifications You must be signed in to change notification settings

vrutik2809/dbman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Manipulator

This is CLI based linux application where user can use various functionality like creating database, creating table, updating database, updating table. It uses Process Management concept to enhance the performance of the operations.

Steps to run the project

  • clone this repository using git clone https://github.com/vrutik2809/dbman.git
  • cd dbman/src
  • make all
  • ../bin/main.out

List of commands

Command Description Throwable Erros
create db <db_name> create database named db_name
  • database already exists
create table <db_name> <table_name> create table named table_name in db_name database
  • database doesn't exist
  • table already exist
insert fields <db_name> <table_name> <field_1> <field_2> ... initialize the table by inserting listed fields in <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
  • table already initialized
insert values <db_name> <table_name> <val_1> <val_2> ... insert values in <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
  • numbet of values is not same as number of fields
insert values async <db_name> <table_name_1> <csv_file_name_1> <table_name_2> <csv_file_name_2> ... insert all values of csv_file_name into corresponding <db_name>.<table_name> table asynchronously by creating individual process for each tuple of csv file and table
  • database doesn't exist
  • table doesn't exist
  • csv file doesn't exist
  • numbet of fields in csv file is not same as number of fields in corresponding table
display <db_name> <table_name> display <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
fetch <db_name> <table_name> <id_1> <id_2> ... fetch rows of listed ids from <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
  • id doesn't exist
update db <db_name_old> <db_name_new> update database name from db_name_old to db_name_new
  • database doesn't exist
update table <db_name> <table_name_old> <table_name_new> update table name from table_name_old to table_name_new
  • database doesn't exist
  • table doesn't exist
update values <db_name> <table_name> <id> <val_1> <val_2> update row of id in <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
  • id doesn't exist
delete db <db_name> delete db_name database
  • database doesn't exist
delete table <db_name> <table_name> delete <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
delete values <db_name> <table_name> <id> delete row of id from <db_name>.<table_name> table
  • database doesn't exist
  • table doesn't exist
  • id doesn't exist
man print manual for all commands
exit exit from the application

Demo

preview of make and create command

first

preview of insert and insert asynchronous command

second

preview of update and delete command

third

About

CLI based tool to perform CRUD operations with databases and tables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published