{"id":21294565,"url":"https://github.com/al-ghaly/bsql-engine","last_synced_at":"2026-05-05T03:37:58.930Z","repository":{"id":216939462,"uuid":"739666986","full_name":"al-ghaly/BSQL-Engine","owner":"al-ghaly","description":"A multiuser lightweight DBMS written in bash","archived":false,"fork":false,"pushed_at":"2024-02-01T07:03:10.000Z","size":382,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T06:48:06.814Z","etag":null,"topics":["bash","bash-scripting","linux-shell","redhat7","scripting","shell-scripting"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/al-ghaly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-01-06T06:53:46.000Z","updated_at":"2024-01-27T08:26:43.000Z","dependencies_parsed_at":"2024-01-18T10:41:21.191Z","dependency_job_id":"9acab5c5-ff44-46cb-9dc0-a6c45c9f88b4","html_url":"https://github.com/al-ghaly/BSQL-Engine","commit_stats":null,"previous_names":["al-ghaly/bsql-engine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-ghaly%2FBSQL-Engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-ghaly%2FBSQL-Engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-ghaly%2FBSQL-Engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al-ghaly%2FBSQL-Engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al-ghaly","download_url":"https://codeload.github.com/al-ghaly/BSQL-Engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762269,"owners_count":20343979,"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-scripting","linux-shell","redhat7","scripting","shell-scripting"],"created_at":"2024-11-21T13:59:46.689Z","updated_at":"2026-05-05T03:37:58.892Z","avatar_url":"https://github.com/al-ghaly.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# B-SQL\n      Welcome to Bash-SQL, a simple Database Management System implemented in Bash.\n\n\n## Overview\n\u003cspan style=\"font-size:larger;\"\u003eThis project provides a basic DBMS functionality, supporting various commands varying from DCL and DDL to DML. It's designed to be a lightweight solution for simple database operations within a Bash environment.\u003c/span\u003e\n\n\u003cbr\u003e\n\n# Supported Commands\n##  DCL - System Commands (Data Control Language)\n\u003cspan style=\"font-size:larger;\"\u003eThis is a subset of SQL responsible for defining and managing access and permissions to SYSTEM objects like (users, schemas, databases, tables, ... ).\u003cbr\u003e\u003c/span\u003e\n\n### 1. Register User\n\u003eTo Create a new user \n- Format: `REGISTER USER username password`\n- Example: `REGISTER USER Ghaly 12345`\n- Complexity: *O(U)*\n   - **U**: is the number of users in the system\n\n\n### 2. Delete User\n\u003eTo delete your account from the system\u003cbr\u003e You have to be logged in and not connected to a database\n- Format: `DELETE USER`\n- Complexity: *O(U)*\n\n### 3. Login User\n\u003eTo log into the system\n- Format: `LOGIN USER username password`\n- Example: `LOGIN USER Ghaly 12345`\n- Complexity: *O(U)*\n\n### 4. Logout\n\u003eTo log out from the system\n- Format: `LOGOUT`\n- Complexity: *O(1)*\n\n### 5. Create Database\n\n- Format: `CREATE DATABASE database`\n- Example: `CREATE DATABASE COLLEGE`\n- Complexity: *O(1)*\n\n### 6. Drop Database\n\n- Format: `DROP DATABASE database`\n- Example: `DROP DATABASE COLLEGE`\n- Complexity: *O(1)*\n\n### 7. Connect to a Database\n\n- Format: `CONNECT DATABASE database`\n- Example: `CONNECT DATABASE COLLEGE`\n- Complexity: *O(1)*\n\n### 8. Disconnect\n\u003eTo disconnect from a database\n- Format: `DISCONNECT`\n- Complexity: *O(1)*\n\n### 9. List Databases\n\u003eTo list all the databases in the system\n- Format: `LIST DATABASES`\n- Complexity: *O(1)*\n\n##  DDL - Database Commands (Data Definition Language)\n\u003cspan style=\"font-size:larger;\"\u003eThis is a subset of SQL used for defining and managing the structure of a database, including creating, modifying, and deleting database objects like tables.\u003cbr\u003eYou need to be connected to a database to run these commands\u003c/span\u003e\n\n### 1. Create Table\n\n- Format: `CREATE TABLE table (column/data type/constraint, ... )`\n- Example: `CREATE TABLE STUDENTS (ID/INT/PK, NAME/STRING/REQUIRED, CITY/STRING, AGE/INT, EMAIL/STRING/UNIQUE)`\n- Complexity: *O(C)*\n   - **C**: is the number of columns in the table\n- Constraints\n   - Primary Key (PK)\n   - Foreign Key (FK) Still Yet to be Integrated\n   - Unique\n   - Required\n\n### 2. Drop Table\n\n- Format: `DROP TABLE table`\n- Example: `DROP TABLE STUDENTS`\n- Complexity: *O(1)*\n\n### 3. Truncate Table\n\n- Format: `TRUNCATE TABLE table`\n- Example: `TRUNCATE TABLE STUDENTS`\n- Complexity: *O(1)*\n\n### 4. Add Column\n\n- Still Yet To be Implemented\n\n### 5. Drop Column\n\n- Format: `DROP COLUMN table, column`\n- Example: `DROP COLUMN STUDENTS, AGE`\n- Complexity: *O(N)*\n   - N: is the number of rows in the table\n\n### 6. List Tables\n\u003eTo list all the tables in the database\n- Format: `LIST TABLES`\n- Complexity: *O(1)*\n\n##  DML - Table Commands (Data Manipulation Language)\n\u003cspan style=\"font-size:larger;\"\u003eThis is a subset of SQL used for interacting with and manipulating data stored in a database.\u003cbr\u003e\nYou need to be connected to a database to run these commands\u003c/span\u003e\n\n### 1. Insert Command\n\n- Format: `INSET INTO table VALUES [COLUMN1=value, ...]`\n- Example: `INSERT INTO STUDENTS VALUES  [ID=1, NAME=Ali, CITY= Cairo, AGE=24]`\n- Complexity: *O(N.C)*\n\n### 2. Delete Command\n\n- Format: `DELETE FROM table WHERE COLUMN1=(value)`\n- Example: `DELETE FROM STUDENTS WHERE NAME=(Aly)`\n- Complexity: *O(N)*\n\n### 3. Update Command\n\n- Format: `UPDATE table SET [COLUMN1=value, ...] WHERE COLUMN=(value)`\n- Example: `UPDATE STUDENTS SET [AGE=25, NAME=Samy, CITY= ] WHERE NAME = (Bassam)`\n   `UPDATE STUDENTS SET [CITY=Cairo]`\n- Complexity: *O(N.C)*\n\n### 4. Select Command\n\n- Format: `SELECT COLUMN1, COLUMN2, ... FROM table WHERE COLUMN=(value)`\n- Example: `SELECT NAME, AGE, ID FROM STUDENTS WHERE NAME = (Aly)` \n`SELECT * FROM STUDENTS`\n- Complexity: *O(N)*\n\n## Other Commands\n\n### 1. Exit\nUsed to exit the application\n- Format: `EXIT`\n- Complexity: *O(1)*\n\n### 2. Clear\nUsed to clear the application's terminal\n- Format: `CLEAR`\n- Complexity: *O(1)*\n\n ### USE # FOR COMMENTS\n\n\u003cbr\u003e\u003cbr\u003e\n# Usage\n\u003cspan style=\"font-size:larger;\"\u003eTo use Bash DBMS, follow these steps:\u003c/span\u003e\n\n\n## Clone the repository:\n   ```bash\n   git clone https://github.com/al-ghaly/BSQL-Engine.git\n   cd BSQL-Engine\n   ```\n\n## Run the file and start interacting with the command line App:\n   ```bash\n   ./BSQL.bash\n   ```\n\n## Alternatively you can write your B-SQL commands in a file and then run it as a script:\n   ```bash\n   ./BSQL.bash \u003efilename\n   ```\nExample\n   ```\n   ./BSQL.bash script\n   ```\nIn the script file write your BSQL Commands each command in a single line \nand you can use \"#\" For comments.\n\u003chr\u003e\n\n### Live Demo\n\n\n\n\n\n\nhttps://github.com/al-ghaly/BSQL-Engine/assets/61648960/d4c78de7-d1b8-450a-aef9-afa111197aec\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-ghaly%2Fbsql-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal-ghaly%2Fbsql-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal-ghaly%2Fbsql-engine/lists"}