Question: 1. Create the following table in your database using this code (post the script directly in MySQL workbench window and then run) : create table

1. Create the following table in your database using this code (post the script directly in MySQL workbench window and then run): create table Employee ( emp_id INT NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, email VARCHAR(40) NOT NULL, address VARCHAR(40) NOT NULL, department VARCHAR(40) NOT NULL, PRIMARY KEY ( emp_id ) ); INSERT INTO Employee (name, email, address, department) VALUES ("Julia Bunt", "buntj@email.com", 28 Main Street, New York, NY", "Head of Dining Hall"); INSERT INTO Employee (name, email, address, department) VALUES ("Mary Finn", "finnm@email.com", "21 14th Street, New York, NY", "Helpdesk Admin"); INSERT INTO Employee (name, email, address, department) VALUES ("Abby Smith", "smitha@email.com", "77 Main Street, New York, NY", "Computer Scientist");

Note *** Employee ID is automatically generated, and you do not need to enter that field when doing the insert (see the INSERT statements above).

2. Create a Java class that establishes a connection to your database and executes the following queries: a. Insert a new Employee into the table b. Update an existing Employee in the table c. Select all Employees from the table. d. Delete an Employee from the table. e. Select an Employee from the table using an Employee, name from user input. Your code should output the contents of the database table after every SQL execution. Take a snapshot (screenshot) of the contents of the database table after every output (from the console or from the workbench).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!