Assignment #2       Com S 561      40 points          Due  April 30, 2007

 

a) Use JDBC to insert the following data into your database from Assignment

1.

 

employeeid         name                       employeeadd              projectgroup       dept

1014                   John Doe                 Des Moines,Ia           sales                     sales         

1020                   Janet Toms              Ames,Ia                      it                          it                

1030                   Mary Rivers           Boone,Ia                     it                           it

1040                   Barry Able              Des Moines,Ia           sales                     sales

1050                   Dana Jones             Ames,Ia                      design                  engg          

1060                   Don Jones               Ames,Ia                       it                           it

 

b) Use JDBC to query your database to determine the list of employee names

and addresses of employees that work in the sales department.

 

c) Use JDBC to change the address of employee 1030 to reflect that he

has moved to Ames,Ia.

 

d) Use JDBC to remove employee 1050 from the database.

 

e) Use JDBC to query your database to determine the list of employee names

and addresses of employees that work in the sales department.

 

f) Use JDBC to query your database to determine the list of employee names

and addresses of employees that work in Ames.  Note that the state is

missing.

g) Use JDBC to create a table to store department information and insert the following tuples.

Department Code                  Department Name     Manager

sales                                        Sales                            John Jones

engg                                        Design Center            Jill Jackson

it                                              Information Tech      Janet Toms

mang                                       Administration          Janet Johnson