Triggers In the database ProductOrders created in the previous exercise, create the following triggers: 1. Trigger...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Triggers In the database "ProductOrders" created in the previous exercise, create the following triggers: 1. Trigger to print a message "N customers are successfully inserted" when some customers are inserted into the Customers table, where N is the number of inserted customers. 2. Trigger for the insertion of a product into an order (insert into Orderltems), if SellPrice < Price then do not allow the insertion (use after or for in this trigger). 3. Trigger for the update of SellPrice in OrderItems, if SellPrice < Price, then do not allow the update (use instead of in this trigger). 4. Trigger for the insertion of a product into an order (insert into OrderItems): a. If Quantity > StockQuantity, then refuse the insertion. b. If Quantity <= StockQuantity, then update the StockQuantity of the corresponding product (StockQuantity = StockQuantity - Quantity) 5. Trigger for the update of Quantity in OrderItems: a. If the StockQuantity is not enough after the update, then refuse the update b. If the StockQuantity is enough after the update, then update the StockQuantity of the corresponding Product. 6. Trigger for the insertion of a product into an order (insertion into OrderItems): a. Update the Discount of the corresponding row in Orderltems table. b. Update the Amount of the corresponding order in Orders table. 7. Trigger for the update of OrderItems: a. Update the quantity of product in Products table. b. Update the Amount of the corresponding order in Orders table. Triggers In the database "ProductOrders" created in the previous exercise, create the following triggers: 1. Trigger to print a message "N customers are successfully inserted" when some customers are inserted into the Customers table, where N is the number of inserted customers. 2. Trigger for the insertion of a product into an order (insert into Orderltems), if SellPrice < Price then do not allow the insertion (use after or for in this trigger). 3. Trigger for the update of SellPrice in OrderItems, if SellPrice < Price, then do not allow the update (use instead of in this trigger). 4. Trigger for the insertion of a product into an order (insert into OrderItems): a. If Quantity > StockQuantity, then refuse the insertion. b. If Quantity <= StockQuantity, then update the StockQuantity of the corresponding product (StockQuantity = StockQuantity - Quantity) 5. Trigger for the update of Quantity in OrderItems: a. If the StockQuantity is not enough after the update, then refuse the update b. If the StockQuantity is enough after the update, then update the StockQuantity of the corresponding Product. 6. Trigger for the insertion of a product into an order (insertion into OrderItems): a. Update the Discount of the corresponding row in Orderltems table. b. Update the Amount of the corresponding order in Orders table. 7. Trigger for the update of OrderItems: a. Update the quantity of product in Products table. b. Update the Amount of the corresponding order in Orders table.
Expert Answer:
Answer rating: 100% (QA)
SOLUTION1 Givendat We are create a trigger on ride table when return time is changed to an earlier time Please insert a message into parkmessage table for each customer who has unused reservation stat... View the full answer
Posted Date:
Students also viewed these databases questions
-
Jamison and Co make lightweight yoga mats. Jamison is preparing its budget for the second quarter of 2022. Each mat sells for $24. Sales in units are as follows: February 12,000 $288,000 March 12,000...
-
Refer to Exercise 4.11, where Y is the number of firing pins tested in a sample of five selected from a large lot. Suppose the cost of inspecting a single pin is $300 if the pin is defective and $100...
-
Prunella raises peaches. Where L is the number of units of labor she uses and T is the number of units of land she uses, her output is f (L, T) = L 1 2 T 1 2 bushels of peaches. (a) On the graph...
-
How are externalities reduced within a firm?
-
Schonfeld Corporation began operations on December 1, 2014. The only inventory transaction in 2014 was the purchase of inventory on December 10, 2014, at a cost of $20 per unit. None of this...
-
Each of these items must be considered in preparing a statement of cash flows for Mauer Co. for the year ended December 31, 2010. For each item, state how it should be shown in the statement of cash...
-
The isotopes magnesium-24 (mass \(3.983 \times 10^{-26} \mathrm{~kg}\) ) and magnesium-26 (mass \(4.315 \times 10^{-26} \mathrm{~kg}\) ) are to be separated using a mass spectrometer in which the...
-
Multiple Choice. Choose the best answer. 1. Which of the following activities would always indicate that an auditors independence has been impaired? a. Providing advice on establishing an internal...
-
1.XYZ Corp. just paid an annual dividend of $3 per share on its common stock. This dividend is expected to grow at a 10 percent annual rate for two years, after which it is expected to grow at a 6...
-
Kendrick Anderson Furniture Maker, LLC creates custom tables in Atlanta. Assume that the following represents monthly information on production volume and manufacturing costs since the company...
-
Explore financial ratios and compare your business financial health to similar organizations. Part I: Review the assigned Moserk Company's financial statements in the Financial Ratio Worksheet, and...
-
The management of Could Do Better has asked you to explain the concept of weighted average cost of capital. In particular, they are confused that you are encouraging the use of debt capital to fund...
-
In the hybrid fee-subsidy scheme described in Figure 15.7, suppose there are two additional marginal savings functions, one even higher than \(\mathrm{MS}_{\mathrm{H}}\) and one lower than \(M...
-
The Chicago Mercantile Exchange houses the fed funds futures market as well as a number of other interest rate options and futures. Go to http://www.cmegroup.com/...
-
Go to www.sec.gov/ and click on Press Releases. a. Summarize the major types of issues that the SEC addresses in these press releases. b. Review the past three months of releases, and count how many...
-
Go to http://www.soxlaw.com/. This site tracks issues and news related to the Sarbanes-Oxley Act. a. Summarize in two or three sentences the primary reason for the passage of the Sarbanes-Oxley Act....
-
4 10 points eBook Hint Print References General Optic Corporation operates a manufacturing plant in Arizona. Due to a significant decline in demand for the product manufactured at the Arizona site,...
-
The company manufactures three products: wooden chairs, tables and dressers. AFC started off as a 'Mom & Pop' shop but has grown rapidly. AFC uses one assembly line to build all three products,...
-
Yolanda wants to know how much time she typically spends on her cell phone. She goes to her phones website and records the call length for a random sample of 12 calls, shown in Table 3. Find the mean...
-
Find the median score of the data in Table 1. Approach Follow the steps listed on the previous page. Table 1 Student Score 1. Michelle 82 2. Ryanne 77 3. Bilal 90 4. Pam 71 5. Jennifer 62 6. Dave 68...
-
The data in Table 5 represent the birth weights (in pounds) of 50 randomly sampled babies. (a) Find the mean and the median birth weight. (b) Describe the shape of the distribution. (c) Which measure...
Study smarter with the SolutionInn App