Table of Contents
The project is a simple bank database which has 2 parts: In the first part you are asked to create a view that checks all the National Ids in the database and specifies whether it is valid or invalid. In the second part the information of one transaction in the bank is given to you and you have to find the first source and the last destination of the amount of transferred money in the given transaction, among all of the transactions in the bank database. you can find out the details in DB1PROJIUT2022.pdf.
- DB1PROJIUT2022.pdf - Project's details.
- Bank-DDL.sql - Where all insertions and table creations reside.
- Bank-Q1.sql - Related to the first part of the project which is a view that examines the validity of National Id.
- Bank-Q2.sql - Related to the second part of the project which finds the first source and the last destination of the given amount of money.
- Bank-UI-Q1.py - A simple customized table for the first part of the project.
- Bank-UI-Q2.py - A simple customized table for the second part of the project.
- Running SQL files
- Run Bank-DDL.sql to create all the tables and add related data to the database.
- Run Bank-Q1.sql to create the view.
- Run Bank-Q2.sql to create 2 included recursive funcitons.
- Running python files
- To execute these files you first need to install matplotlib library, to do so enter the below command in your terminal:
$python -m pip install -U matplotlib
- Next you need to install psycopg2 library, to do so enter the below command in your terminal:
$pip install psycopg2-binary
- Now you're ready to run the files and see the customized tables! In order to do that enter the following commands for the first file and the second file respectively:
$python Bank-UI-Q1.py
$python Bank-UI-Q2.py