Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a PL/SQL block that will display Descriptions (Full Names) of all Courses that do NOT need a Prerequisite in alphabetical order. Display also the

 Write a PL/SQL block that will display Descriptions (Full Names) of all Courses that do NOT need a Prerequisite in alphabetical order. Display also the total number of these courses. Use also an explicit cursor to solve this problem. Show all 4 phases when dealing with the cursor Here is the output:

Course Description : 1: DP Overview
Course Description : 2: Intro to Computers
Course Description : 3: Java for C/C++ Programmers
Course Description : 4: Operating Systems
************************************
Total # of Courses without the Prerequisite is: 4
PL/SQL procedure successfully completed.

2) Rewrite problem 1) by using an automated Cursor For Loop and INDEX BY Table to store Descriptions.

3) Write a PL/SQL block that will ask for an input of first 3 digits for a Zip Code and then will display number of students for each zip code. It will also calculate the total number of zip codes and total number of students for this 3 digit zip area. In the case that zip area is empty (NO students from there), it should display an appropriate message. You should use RECORD type with 2 components and Cursor with manual handling (all 4 phases). Here are the possible outputs:

073

Zip code : 07302 has exactly 1 students enrolled.
Zip code : 07304 has exactly 2 students enrolled.
Zip code : 07306 has exactly 4 students enrolled.
Zip code : 07307 has exactly 3 students enrolled.
************************************
Total # of zip codes under 073 is 4
Total # of Students under zip code 073 is 10
PL/SQL procedure successfully completed.

013

This zip area is student empty. Please, try again.
PL/SQL procedure successfully completed.

4) Rewrite problem 3) by using an automated Cursor For Loop and INDEX BY Table instead of RECORD type.

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

Calculus Early Transcendentals

Authors: James Stewart

8th edition

1285741552, 9781305482463 , 978-1285741550

More Books

Students also viewed these Accounting questions

Question

What is quality of work life ?

Answered: 1 week ago

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

What are Fringe Benefits ? List out some.

Answered: 1 week ago