Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

2. How will you handle the situation?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago