Question: 1.Write SQL INSERT and UPDATE statements as specified. The first three INSERT statements are identical from modification problems in assignment 2 basic. a) Insert a

1.Write SQL INSERT and UPDATE statements as specified. The first three INSERT statements are identical from modification problems in assignment 2 basic.

a) Insert a new row into the Facility table with facility name Swimming Pool.

b) Insert a new row in the Location table related to the Facility row in modification problem 1. The new row should have Gate for the location name.

c) Insert a new row in the Location table related to the Facility row in modification problem 1. The new row should have Locker Room for the location name.

d) Change the location name for all locations of the swimming pool facility. The new location name should be Door. You must not use the facility number of the swimming pool in your UPDATE statement. You also cannot reference specific location numbers in your UPDATE statement. (10 points)

e) Delete the swimming pool facility and all related locations. When deleting the locations, you must not use the facility number of the swimming pool in your DELETE statement. Pretend that the user knows only the facility name, not the facility number. You also cannot reference specific location numbers in your DELETE statement. (Hint: when deleting a parent and related rows in a child table, the RESTRICT option requires deletion of the child rows before the related parent row.) (10 points)

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!