a. Write a trigger that fires when a part's price is updated. The trigger will write a record into a table called PriceUpdates. The record should contain the information of PNO, new price and old price of the part, and date when the change is made.
b. Test the above trigger by updating the price of the part 10506 from 19.99 to 24.99. List the tables parts and priceUpdates to verify the results are correct.
2. Delete Trigger: Write a trigger that fires when a command tries to delete some rows from employees. The trigger should reject the deletion and display the warning information "failed operation" to the user. (Tip: use the system function raise_application_error).
3. (extra credit)Delete trigger
a. Write a trigger that fires if all records about an order in odetails are deleted. The trigger should delete the corresponding order from the orders table and record the dropped order in a table, called deleted_orders
Hint: One of your tasks is to create the table deleted_orders, and you need to decide what attributes should be included in the table. Besides, you need to figure out how to identify if all parts of an order have been deleted from odetails.
b. Test the above trigger by deleting the parts with ONO=1020. Then list the tables orders, odetails, and deleted_orders to verify the results are correct.