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

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", "2114th 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).
1) 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.

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 Programming Questions!