Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PL / SQL Block Structures 1. [3 marks] The Brewbean's application contains a page displaying order summary information, including IDBASKET, SUBTOTAL, SHIPPING, TAX and TOTAL

PL / SQL Block Structures

image text in transcribed

image text in transcribed

1. [3 marks] The Brewbean's application contains a page displaying order summary information, including IDBASKET, SUBTOTAL, SHIPPING, TAX and TOTAL columns from BB_BASKET table. Create a PL/SQL block with scalar variables to retrieve this data and then display it. An initialized variable should provide the IDBASKET value. Test the block using any existing basket ID 2. [5 marks] An organization has committed to matching pledge amounts based on the donor type and pledge amount. Donor types include I (for Individual), B (for Business organization), and G (for Grant funds). The matching percentage is shown below: Create a PL/SQL anonymous block to accomplish the task. Input values for the block are the donor type code and the pledge amount. 3. [3 marks] Create a PL/SQL anonymous block to insert a new project in DoGood Donor database. Create and use a sequence to handle generating and populating the project ID. The first number issue by the sequence should be 800 , and no caching should be used. Use a record variable to handle the data to be added. Data for the new row should be the following: project name is "Covid-19 relief fund", start date: Feb 1, 2023, end date: Jun 30, 2023, and fundraising goal is half million. Any columns not addressed in the data list are currently unknown. 4. [4 marks] Create anonymous block to retrieve and display data for all pledges made in a specified month. One row of output should be displayed for each pledge. More specifically, each row include: a. Pledge ID, donor ID, and pledge amount b. If the pledge is being paid in a lump sum, display "Lump Sum" c. If the pledge is being paid in monthly, display "Monthly " followed by number of months for payment d. The list should be sorted to display all lump sum pledges first

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions

Question

C) and for AF? Pg45

Answered: 1 week ago