Files
2025-06-17 14:42:22 -07:00
..
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00
2025-06-17 14:42:22 -07:00

Please ensure that g++ is running version 11. This is needed for the filesystem library

To start program either:
./SQLExecutable for manual command input 
or
./SQLExecutable <filename> to run a test script

This program parses an SQL file and executes the commands in the file. 
Functionaliy includes Creating, deleting, and using databases
Aswell as Creating, deleting, Select(printing), and Altering tables.

The program organizes multiple databases by creating a new folder in the file path that
the executable is runned at. Then it gives that folder a inputed name and the program is able
to access any of the databases through a static directory file path that works by taking the initalized path + the database name.

The Program organizes multiple tables through a file path that is updated by the use database
function. Then the a table is created with the inputed name and can be accessed through the 
updated filepath + the tables name.

Database:

CreateDatabase:
Creates a directory to reperesent the database by making a new folder in the inital file path

DropDatabase:
Removes the database after directory is found in program and deletes the folder.

USEDATABASE:
Updates file path to selected database for table functions to read. 

Tables:

Create Table:
creates a table based on the inputed file path. Then creates a .csv file with the inputed table name

Drop Table: 
Deletes table inputed to program by taking inputed file path + the table's name. Then deleteing that target. 

Select Table:
Reads from a .csv that conatains table data and prints output from the table. Iterates by detecting a comma.

Apend Table:
Appends to a .csv file that contains table data. By reading inputed file, copying it to a temp file, then appending the new data to the temp file. Then deleting the original file and renaming the temp file to the original file name.