Problem

Ray Henry would like you to complete the following tasks to help him maintain his databa...

Ray Henry would like you to complete the following tasks to help him maintain his database. In the following exercises, you will use the data in the Henry Books database shown in Figures 1-17 through 1-20 in Chapter 1. (If you use a computer to complete these exercises, use a copy of the original Henry Books database so your data will not reflect the changes you made in Chapter 3.) If you have access to a DBMS, use the DBMS to perform the tasks and explain the steps you used in the process. If not, explain how you would use SQL to obtain the desired results.

Assume the Branch table contains a column called TotalValue that represents the total price for all books at that branch. Following the style shown in the text, write the code for the following triggers.

a. When inserting a row in the Copy table, add the price to the total value for the appropriate branch.

b. When updating a row in the Copy table, add the difference between the new price and the old price to the total value for the appropriate branch.

c. When deleting a row from the Copy table, subtract the price on the record being deleted from the total value for the appropriate branch.

Reference:

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search