The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 337 Weeks Ago, 3 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
PLEASE USE SQL SERVER TO EXECUTE THESE PLEASE. PROVIDE SCREENSHOTS!
20. Now let us do something more complex with a trigger. Imagine that we would like to
store a history of price changes for each item. To do so, we would first need to create an
Item_price_history table that stores at a minimum a reference to the item, its old price,
its new price, and the date of the change. We could then define a trigger on the Item
table that updates the Item_price_history table whenever an item price is updated.
For this step, go ahead and create the Item_price_history table as described. Paste in an
updated ERD which includes that new table. Also capture a screenshot of the table
creation in SQL.
21. Define the trigger as described in the previous step
22. Last, change the price of plates to 11, and the price of spoons to 4. Capture a
screenshot of a listing of the contents of the Item_price_history table, which verifies
that your trigger did indeed store the price change history as expected. Briefly explain
the contents of the table.
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly