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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started