Write a script to test your procedure demonstrate the both


Need the procedures for these questions in qsuedo code 1. Create a stored procedure name procBookPriceUpdate that updates the price of a book based on the ISBN number as specified below. a. Create a procBookPriceUpdate stored procedure that requires the following parameters. i. ISBN ii. Price b. procBookPriceUpdate () if ISBN is invalid throw error else If Price is negative throw error else update price end The procedure must implement the following pseudo code. See pages 430 to 447 for examples. 1. Write a script to test your procedure. Demonstrate the error messages. Include select statements to verify the rows were added. 2. Create a stored procedure name procPublisherDelete that implements cascade delete of Publisher, Books, and BookAuthors based on the PublisherID. The procedure should implement a transaction and rollback any modifications if an error occurs. a. Create a procPublisherDelete stored procedure that requires the following parameters. i. PublisherID b. The procedure must implement the following pseudo code. See page 505 for transaction example. examples. procPublisherDelete() Try Begin Transaction Delete related BookAuthors Delete related Books Delete Publisher Commit Transaction Catch Rollback Transaction end a. Use the following subquery to delete BookAuthor records DELETE FROM BookAuthors WHERE BookID IN (SELECT BookID FROM Books WHERE PublisherID = @PublisherID) 2. Write a script to test your procedure. Demonstrate the both the commit and the rollback.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a script to test your procedure demonstrate the both
Reference No:- TGS0646616

Expected delivery within 24 Hours