Make SQL Triggers Make a table Requirements: Make the following SQL triggers: Make a trigger called
Fantastic news! We've Found the answer you've been seeking!
Question:
- Make SQL Triggers
- Make a table
Requirements:
Make the following SQL triggers:
- Make a trigger called TR_1 to ensure that the Price in the Service table does not increase by more than 12% at a time. Should this happen, raise an error, and prevent the operation from occurring. (4 marks)
- Due to limited capacity, a booking is only allowed to have a maximum of 4 Dog Services! Make a trigger called TR_2 to ensure that a booking does not have more than four Dog Services. If an attempt is made where a booking would have more than 4 Dog Servers, raise an error, and prevent the operation from occurring. (5 marks)
- To attract more clientele, Doggy Day Care wants to keep all Service Prices $100 or less! Make a trigger called TR_3 to ensure Service Prices do not go above $100. If an attempt is made to update any Service Price above $100, set that price or prices to $100. (4 marks)
- In order to price services appropriately, Doggy Day Care would like to track changes to the prices of their services. Make a trigger called TR_4 to log changes to the price of Services. When the price of one or more services changes, add a record for each service that actually changed prices (prices that were updated to the same price they already were should not be logged) to the LogPriceChanges table. The LogPriceChanges table is included in the Lab4Data.sqlfile. (4 marks)
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: