[SOLVED] DBS501 Lab3

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon LAB3-g7yzpg.zip (12.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

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.          

  • LAB3-g7yzpg.zip