67%(3)2 out of 3 people found this document helpful
This preview shows page 1 - 2 out of 2 pages.
same task. Test your code with the same donor ID you tested in assignment 1. You must get the same results. (15 points)3.Use Donor database. The Donor application contains a page that allows administrators to change the ID assigned to a donor in the DD_DONOR table. Create a PL/SQL block to handle this task. Include exception-handling code to address an error raised by attempting to enter a duplicate donor ID. If this error occurs, display the message “This ID is already assigned.” Test the code by changing the donor ID 305 to 310. (Do not include the COMMIT statement; rollback the database using ROLLBACK command). (15 points)4.Use Donor database. Create a PL/SQL block that accepts a donor id and handles the following messages. (5 points each)a.If the donor id entered is invalid, raise an error “Invalid donor id (donor id) is entered!” message.Prepared by Ann AksutPage 1
DBA220 Database Programming IISpring 2015Lab Assignment 4 - 60 pointsb.If the donor has more than 1 donation in the pledge table, raise message “The donor (donor id, donor’s first name and last name) has more than one pledge.” See the sample output below. c.If the donor has 1 donation in the pledge table, raise message “The donor (donor id, donor’s first name and last name) has only one pledge.” Prepared by Ann AksutPage 2