- Clone the GitHub repository onto your system via the terminal and using the following command:
git clone https://github.com/madhav0407/DBMS_Project.git
- Open a new terminal and use the following command to open mysql. Upon entering the password, you will be directed into mysql.
mysql -u root -p
- Now, create a database called bank and use it. This can be done using the following command:
create database bank;
use bank;
- Use the sql source command to run the .sql files stored in the sql directory. You will have to use the path to the .sql file when using the source command.
source <pathname_where_cloned>/DBMS_Project/sql/create.sql
source <pathname_where_cloned>/DBMS_Project/sql/alter.sql
source <pathname_where_cloned>/DBMS_Project/sql/insert.sql
-
Now, we will open the project folder into Visual Studio Code. Here, we will open file DAO_Factory.java. In this file, we should change the value of the variable PASS(on line 19) to your own sql password.
-
Open the DAO_demo.java (since this is the driver code) and now, we shall run the project by clicking the Run Java button(in the top right corner of the VS Code window) as shown in the figure below.
-
The Project will run in the terminal and is user driven.