Implementation of database with data about School 21 and writing procedures and functions to retrieve information, as well as procedures and triggers to change it.
Information about each table, relationship and constraints you can find in materials or by this link
Written a part1.sql script that creates the database and all the tables described above.
Added procedures that allow to import and export data for each table from/to a file with a .csv extension.
The csv file separator is specified as a parameter of each procedure.
To import data from .csv files (if you on MacOs) just run
sh Part1.sh
or uncomment rows in Part1.sql with procedure execution
There are at least 10 records in each table.
Parameters: nickname of the person being checked, checker's nickname, task name, P2P check status, time.
If the status is "start", add a record in the Checks table (use today's date).
Add a record in the P2P table.
If the status is "start", specify the record just added as a check, otherwise specify the check with the latest (by time) unfinished P2P step.
Parameters: nickname of the person being checked, task name, Verter check status, time.
Add a record to the Verter table (as a check specify the check of the corresponding task with the latest (by time) successful P2P step)
3) Written a trigger: after adding a record with the "start" status to the P2P table, change the corresponding record in the TransferredPoints table
In this part created 25 different functions or procedures to get data from DataBase All tasks you can find in materials or by this link
For this part of the task, i created a separate database, in which i imlemented the tables, functions, procedures, and triggers needed to test the procedures.