Question: This program will work with data from an earlier place in the book to get more practice with databases. ( You can create this as
This program will work with data from an earlier place in the book to get more practice with databases. You can create this as a GUI version or a Console version. It is up to you on this.
The sql script to create the employees from chapter in a database is attached to this assignment link. You can open it up in notepad. There is usually a one to one relationship between the database tables and the Data Classes which are shown in chapters and in this book. Note that the classes with inheritance have records in both the parent class table and subclass table with the same Primary Key ID as the key and a Type to match on so the records in different tables can be readinsertedupdated together. Looking at this you have just now learned how it is managed in a database and also have an example to keep on how the data is stored! For simplicity and because you have a project with a database to work on we will be ignoring the subclasses. The script is a good one to use parts for our database for this assignment though.
For the program:
Create a derby database and a Java program that connects to it The java program should have the statements to create the Employee Table and only this table, not the others like salariedEmployees and insert the four employee records into the table.
Create GUI controls to allow the user to give the data and add a new employee into the table, or write the statements in a console program to repeat times asking the user for the data for a new employee and then add them into the table.
Create a button or have the Console program do it at this point to display the seven employees currently in the database.
Create another button or Console code to do it at this point and Textfields to change an employees department using a Social Security Number and new department name entered by the user.
Create another button and TextField to delete an employee by Social Security number.
If you did a Console version, make sure to display the current records in the employee table one last time for the user so they can see the changes from and
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
