Question

Use the Donor database attached to the assignment answer the following: Question 1: Create a block...

Use the Donor database attached to the assignment answer the following:

Question 1:

Create a block to retrieve and display pledge and payment information for a specific donor. For each pledge payment from the donor, display the pledge ID, pledge amount, number of monthly payments, payment date, and payment amount. The list should be sorted by pledge ID and then by payment date. For the first payment made for each pledge, display “first payment” on that output row.

2 marks

Question 2:

Redo question 1, but use a different cursor form to perform the same task.

1 mark

Question 3:

An administration page in the DoGood Donor application allows employees to enter multiple combinations of donor type and pledge amount to determine data to retrieve. Create a block with a single cursor that allows retrieving data and handling multiple combinations of donor type and pledge amount as input. The donor name and pledge amount should be retrieved and displayed for each pledge that matches the donor type and is greater than the pledge amount indicated. Use a collection to provide the input data. Test the block using the following input data. Keep in mind that these inputs should be processed with one execution of the block. The donor type code I represents Individual, and B represents Business.

DonorType PledgeAmount
I 250
B 500

2 marks

Question 4

Create a block with a single cursor that can perform a different query of pledge payment data based on user input. Input provided to the block includes a donor ID and an indicator value of D or S. The D represents details and indicates that each payment on all pledges the donor has made should be displayed. The S indicates displaying summary data of the pledge payment total for each pledge the donor has made.

2 marks

Question 5

The DoGood 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 donor ID 305.
(Don’t include a COMMIT statement; roll back any DML actions used.)

3 marks

Homework Answers

Answer #1

Hey, I have solved your question and will give the instructions below,

I hope you will like the answer and if you still have any problem then do let me know in the comments,

Question 1:

1> Declare

CURSOR PLEDGE_PAYMENT IS

SELECT DDP.IDPLEDGE, DDP.PLEDGEAMT, DDP.PAYMONTHS, DDPY.PAYDATE , DDPY.PAYAMT FROM ((DD_DONOR DDD INNER JOIN DD_PLEDGE DDP ON DD_DONOR.IDDONOR=DD_PLEDGE.IDDONOR) INNER JOIN DD_PAYMENT DDPYon DDP.IDPLEDGE = DDPY.IDPLEDGE) ORDER BY IDPLEDGE, PAYDATE.

Rec_Pledge_Payment Pledge_Payment%rowtype;

BEGIN

OPEN PLEDGE_PAYMENT;

LOOP

FETCH PLEDGE_PAYMENT INTO Rec_Pledge_Payment;

EXIT When PLEDGE_PAYMENT%NOTFOUND:

dbms_output.putline(PLEDGE_PAYMENT.IDPLEDGE||' '|| PLEDGE_PAYMENT.PLEDGEAMT||' '||PLEDGE_PAYMENT.PAYMONTHS||' '||PLEDGE_PAYMENT.PAYDATE||' '||PLEDGE_PAYMENT.PAYAMT);

ENDLOOP;

END;

I hope you liked it,

Thankyou.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
create a PLSQL block to retrieve and display information for a specific pledge. Display the pledge...
create a PLSQL block to retrieve and display information for a specific pledge. Display the pledge ID, donor ID, pledge amount, total paid so far, and the difference between the pledged amount and total paid amount
C# Step 1: Create a Windows Forms Application. Step 2: Create a BankAccount class. Include: Private...
C# Step 1: Create a Windows Forms Application. Step 2: Create a BankAccount class. Include: Private data fields to store the account holder's name and the account balance A constructor with 0 arguments A constructor with 1 argument (account holder's name) A constructor with 2 arguments(account holder's name and account balance) Public properties for the account holder's name and the account balance. Do not use auto-implemented properties. A method to increase the balance (deposit) A method to decrease the balance...
(Use C++ language) Create a program, named threeTypesLoops.cpp, that does the following; 1. Uses a For...
(Use C++ language) Create a program, named threeTypesLoops.cpp, that does the following; 1. Uses a For Loop that asks for a number between 1 and 10; Will double the number each time through the loop and display the answer. Will run five times, so the number will have been doubled five times, and the answer displayed five times. After the loop, display a message saying 'It's done!'. 2. Uses a While Loop; Ask the user to input a friend's name....
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS OR SWITCH STATEMENTS IN THE JAVASCRIPT. Even though there is stylesheet in the HTML file do no create a new one. Project Standards: Students will use click events to capture user input. Students will use variables to store information needed by their application and keep track of their program’s state. Students will use conditionals to control project flow. Project Task You will be building...
Consider the following file arrest.dat containing information of a suspect that the police is looking for:...
Consider the following file arrest.dat containing information of a suspect that the police is looking for: arrest.dat: The police is looking for Robert Whiteshead, also known as Whity, ID number 4607091111027, from address 4 Azalea Court, 219 Belmont Street, Germiston, 2065, in connection with a bank robbery at UNITED BANK in January 2016. An amount of about R45,000,000 was stolen on this day. Apparently he had a helper that goes by the name of JOINT13. Mr Whiteshead was also an...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment 4’s schema (Customer-Invoice-Line-Product-Vendor). Make sure that your SQL script runs without any errors. Submit your answers in a .SQL file. 1 (2 Points) - Find the count of distinctvendors thatsupplied products that are priced lowerthan 185? 2 (2 Points) - For each vendor, find their product that has the lowest product quantity. Your output should include vendor code, vendor name, product description and product...
Hello! I'm getting this assignment wrong according to the cengage software. The code looks right to...
Hello! I'm getting this assignment wrong according to the cengage software. The code looks right to me but apparently it is not. May someone please take a look at it and let me know what I'm doing wrong. I just can't seem to find the error. I'm attaching the question below and below that I will attach my code. I appreciate any help you could provide. The book is: HTML5, CSS3, and JavaScript, 6th edition, Bundle Thanks QUESTION: General Flex...
Please answer in JAVA IDS 401 Assignment 4 Deadline In order to receive full credit, this...
Please answer in JAVA IDS 401 Assignment 4 Deadline In order to receive full credit, this assignment must be submitted by the deadline on Blackboard. Submitting your assignment early is recommended, in case problems arise with the submission process. Late submissions will be accepted (but penalized 10pts for each day late) up to one week after the submission deadline. After that, assignments will not be accepted. Assignment The object of this assignment is to construct a mini-banking system that helps...
Cpp Task: Create a class called Mixed. Objects of type Mixed will store and manage rational...
Cpp Task: Create a class called Mixed. Objects of type Mixed will store and manage rational numbers in a mixed number format (integer part and a fraction part). Details and Requirements Your class must allow for storage of rational numbers in a mixed number format. Remember that a mixed number consists of an integer part and a fraction part (like 3 1/2 – “three and one-half”). The Mixed class must allow for both positive and negative mixed number values. A...
SQL DATABASE Task 4 [1.5 marks] Create Index (0.5 marks) Currently, the database only contains a...
SQL DATABASE Task 4 [1.5 marks] Create Index (0.5 marks) Currently, the database only contains a small number of records. However, the data contained within it is expected to grow significantly in the future. Creating indexes on commonly searched columns is a way performance issues can be minimized. Write a command to create an index on student_name column of the student table. Create view – 1 mark Write a command to create a view to list the student ID and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT