{"id":24779073,"url":"https://github.com/aswajith7077/dbshell","last_synced_at":"2025-03-24T03:27:52.038Z","repository":{"id":272878067,"uuid":"918038621","full_name":"Aswajith7077/DBShell","owner":"Aswajith7077","description":"A SQL-based command line system using C and bash script. Integrated concurrency control using file locking mechanisms. Command line parsing is done using the readline library in C.","archived":false,"fork":false,"pushed_at":"2025-01-17T06:32:28.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T09:40:55.070Z","etag":null,"topics":["c","shell-script","sql"],"latest_commit_sha":null,"homepage":"","language":"C","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/Aswajith7077.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":"2025-01-17T06:05:23.000Z","updated_at":"2025-01-17T09:17:37.000Z","dependencies_parsed_at":"2025-01-17T07:20:29.799Z","dependency_job_id":"0a07d842-6446-48be-9d6b-4a96937339a7","html_url":"https://github.com/Aswajith7077/DBShell","commit_stats":null,"previous_names":["aswajith7077/dbshell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aswajith7077%2FDBShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aswajith7077%2FDBShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aswajith7077%2FDBShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aswajith7077%2FDBShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aswajith7077","download_url":"https://codeload.github.com/Aswajith7077/DBShell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245203661,"owners_count":20577189,"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":["c","shell-script","sql"],"created_at":"2025-01-29T09:35:23.557Z","updated_at":"2025-03-24T03:27:52.014Z","avatar_url":"https://github.com/Aswajith7077.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":" # **Basic Implementation of Database in shell script**\n The script immediately runs authentication function that will keep track of users and\n stores them into a log file.\n A database file consist of contents of database\n- Administrators can alone create the database file.\n- Other Users cannot create or delete the database file.\n- Other Users can create a SQL file and perform queries that modifies the\n contents of the database file.\n\nThen a database shell is created and the shell can perform the following operations:\n 1. If the user is a database administrator, he can perform a CREATE USER to create\n a user.\n 2. **EXIT**: can terminate the shell\n 3. **LOGOUT**: can logout from the database user.\n 4. **PERFORM** *filename*: Opens up a new window to write SQL Queries.\n 5. **COMPILE** *filename*: Runs the file with SQL Queries.\n 6. Any invalid operation will create a log entry with an alert message.\n \nThe Default administrator is given by,\n1. **USERNAME**: SYS\n2. **PASSWORD**: *Created by the first user*\n \n For a User Can perform the following operations in a SQL file:\n 1. INSERT INTO *table_name* VALUES(*value_1*, *value_2*, *value_3*,...);\n    - Inserts the list of values to the given table name\n 2. UPDATE INTO *table_name*:\n    - Updates a value to the attribute--\n    - Can specify a WHERE condition to sort out the records.\n 3. SELECT:\n    - Should specify the attributes----\n    - ***ORDERBY*** sorts the file according to the order specified based on the specified field.\n    - ***WHERE CONDITION*** selects the specifies records from the database\n    - ***GROUPBY*** groups the records based on a particular field\n    - ***HAVING*** conditions for a ***GROUP BY***\n 4. DELETE:\n    - Deletes all the records by default.\n    - WHERE sorts out the records based on the field\n   \n# **How to Run**\n\n1. Compile the C program,\n\n   ```\n   gcc user.c\n   ```\n\n2. Then finally run the bash script\n\n   ```\n   bash ./sample.sh\n   ```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faswajith7077%2Fdbshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faswajith7077%2Fdbshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faswajith7077%2Fdbshell/lists"}