Assignment 4 Due Date: Monday 25 Aug 2003 Revised Due Date: Monday Sep 1 Can be done in groups of 2 as before. ---------------------------------- To learn more about using JDBC follow the JDBC link on the course home page, where you will find several files/directories. You will have to copy classes111.zip to your home directory, and set up environment variables as given in the file setup. There is a link to example programs that you can use as templates. Follow the example link and see the files Main.java, simpleExecute.java and databaseMetaData.java. Try executing these programs first, then create your own. ----------------------------------- Using the database schema of the previous assignment, create a JDBC application having the following facilities. Provide a top level menu (inside a while loop) that allows the user to select which of the following she wants to do (by entering a number). Each functionality has a corresponding function, which may read in parameters from the user, as required. 0) Exit 1) Insert into the people table rows specified by user. The values (including person-id) to be inserted are taken from user interactively. 2) Allow the user to enter a role name (e.g. actor, director, etc; all denotes all roles), and select all the corresponding rows from role table. Display the results formatted as a HTML table. 3) Allow the user to enter a movie-id (for a movie that already exists in the database) and a new name for the movie. Update the tuple correspondingly. 4) List names of all tables in the database, along with their attribute names. You will need to use database metadata for this task, you can copy and modify the example program databaseMetaData.java. 5) Let the user enter an SQL query (only select queries, no updates) and display the result of the query (plain ascii format is fine). You need to use resultset metadata for this task. There is no need for using a graphical user interface, just plain text input/output is fine (except where I've mentioned HTML output). You can save HTML output in a file and view it using a browser to verify correctness.