Search for question
Question

1. Write a program (in java or any other language) to access and manage the contents of

database tables. Follow the following steps to set your computer for the assignment

and accomplish the goal.

a. Download the University database from the class textbook website and load it

to your local MySQL database server.

https://www.db-book.com/university-lab-dir/sample_tables-dir/DDL.sql

b. Load the simple data set.

https://www.db-book.com/university-lab-dir/sample_tables-dir/smallRelations/

smallRelations InsertFile.sql

c. Download the database driver (mysql-connector.java for java language) set it up

with your system

https://dev.mysql.com/downloads/connector/i/

select flatform independent zip file

d. Create a Java program to display the content of any table in the database.

When the table name is given, it should display the content of the table.

i. Program should ask the table name to display when selecting the

display data option from the main menu. Then display the content of the

selected table.

e. Add the functionality to insert record to the instructor table.

i. User should be able to select the option to insert data from the main

menu

ii. User should be asked to enter each column data one after the other and

once the final column data is inserted, it should insert the data to the

department table.

f. Add a main menu item to select set of classes of a given instructor

i. Program should ask the instructor id to display the classes of the

instructor.

ii. The program should list the classes that the given instructor teaches in

the current semester. Instructor may have previous records of teaching

in previous semester, we do not need to display them.

g. Add a main menu item to add a class to an existing instructor

i. User should be able to insert the instructor id to who you need to assign

a class

ii. The user is presented to enter the class information. You must insert the

information in corresponding relation/s.