QUESTION :   1. Write a PL/SQL PROCEDURE that will list the project names given the course ID.   2.  Call the procedure from an anonymous block. Allow the user to enter the course ID (courseno)

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 2.9CP
icon
Related questions
icon
Concept explainers
Question
100%

Below is part of a Student database. The primary keys are highlighted in bold.

Student (studNo, studName, address, mobileNo)

Registration (studNocourseNoregDate, semester, session)

Course (courseNo, courseName, creditHour, level)

Project (projNo, projName, courseNo)

Assignment (projectNo, studNo, startDate, dueDate, hoursSpent) 

 

INSERT INTO STUDENT VALUES (175,'Ali Ahmad','10 jalan Bukit Bintang','019-123');
INSERT INTO STUDENT VALUES (176,'Hanna Syamil','32A Jalan Danau Kota','012-234');
INSERT INTO STUDENT VALUES (182,'Ibnu Hassan','19 Jalan Kota Raya','011-345');
INSERT INTO STUDENT VALUES (183,'Aliya Hamidi','233 Jalan Matahari ','013-456');
INSERT INTO STUDENT VALUES (184,'Kayla Adila','98 Jalan Enau','018-567');

INSERT INTO REGISTRATION VALUES (175,1100,'5/SEP/19',1,'2019/2020');
INSERT INTO REGISTRATION VALUES (175,1103,'3/SEP/19',2,'2019/2020');
INSERT INTO REGISTRATION VALUES (176,1103,'7/SEP/19',2,'2019/2020');
INSERT INTO REGISTRATION VALUES (182,1100,'2/SEP/19',1,'2020/2021');
INSERT INTO REGISTRATION VALUES (182,1103,'6/SEP/19',2,'2020/2021');
INSERT INTO REGISTRATION VALUES (183,1102,'4/SEP/19',2,'2020/2021');

INSERT INTO COURSE VALUES (1100,'PROGRAMMING',3,1);
INSERT INTO COURSE VALUES (1103,'DATABASE',3,1);
INSERT INTO COURSE VALUES (1707,'MATHEMATICS',3,1);
INSERT INTO COURSE VALUES (2302,'WEB TECHNOLOGIES',3,2);
INSERT INTO COURSE VALUES (3102,'DATA WAREHOUSING',3,3);

INSERT INTO PROJECT VALUES (11001,'Tic Tac Toe',1100);
INSERT INTO PROJECT VALUES (11002,'Word Generator',1100);
INSERT INTO PROJECT VALUES (11031,'eZakat',1103);
INSERT INTO PROJECT VALUES (17071,'Stochastic BioNet',1707);
INSERT INTO PROJECT VALUES (17072,'Ensemble Kalman Filter',1707);

INSERT INTO ASSIGNMENT VALUES (11001,175,'01/OCT/17','30/NOV/17',10);
INSERT INTO ASSIGNMENT VALUES (11001,182,'01/OCT/18','30/NOV/18',9.5);
INSERT INTO ASSIGNMENT VALUES (11031,175,'01/MAR/18','30/APR/18',8);
INSERT INTO ASSIGNMENT VALUES (11031,176,'01/MAR/18','30/APR/18',9);
INSERT INTO ASSIGNMENT VALUES (11031,182,'01/MAR/19','12/APR/19',8.5);

 

QUESTION :  

1. Write a PL/SQL PROCEDURE that will list the project names given the course ID.

 

2.  Call the procedure from an anonymous block. Allow the user to enter the course ID (courseno)

Expected output:
Enter the course number: 1100
The project(s) for PROGRAMMING course are as follows:
1. Tic Tac Toe
2. Word Generator
PL/SQL procedure successfully completed.
or
Enter the course number: 1103
The project(s) for DATABASE course are as follows:
1. eZakat
PL/SQL procedure successfully completed.
or
Enter the course number: 1707
The project(s) for MATHEMATICS course are as follows:
1. Stochastic BioNet
2. Ensemble Kalman Filter
PL/SQL procedure successfully completed.
Transcribed Image Text:Expected output: Enter the course number: 1100 The project(s) for PROGRAMMING course are as follows: 1. Tic Tac Toe 2. Word Generator PL/SQL procedure successfully completed. or Enter the course number: 1103 The project(s) for DATABASE course are as follows: 1. eZakat PL/SQL procedure successfully completed. or Enter the course number: 1707 The project(s) for MATHEMATICS course are as follows: 1. Stochastic BioNet 2. Ensemble Kalman Filter PL/SQL procedure successfully completed.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
MIS
MIS
Computer Science
ISBN:
9781337681919
Author:
BIDGOLI
Publisher:
Cengage
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage