Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using PL/SQL. The first page is database table There is three parts with this table you have answer this three parts. Please try to solve
Using PL/SQL. The first page is database table There is three parts with this table you have answer this three parts.
Please try to solve the asap. thank you.
Below is part of a student database. The primary keys are highlighted in bold. SQL> SELECT * FROM project; PROJNO PROJNAME COURSENO Student (studNo, studName, address, mobileNo) Registration (studNo, courseNo, regDate, semester, session) Course courseNo courseName.creditHour, level) Project (projNo, projName, courseNo) Assignment (projNo, studNo, startDate, due Date, hours Spent) Sample data: SQL> SELECT * FROM student; STUDNO STUDNAME ADDRESS MOBILENO 11001 Tic Tac Toe 1100 1100 11002 Word Generator 11031 eZakat 17071 Stochastic BioNet 17072 Ensemble Kalman Filter 1103 1707 1707 175 Ali Ahmad 176 Hanna Syamil 182 Ibnu Hassan 019-123 012-234 SQL> SELECT * FROM assignment; PROJNO STUDNO STARTDATE DUEDATE HOURSSPEND 10 Jalan Bukit Bintang 32A Jalan Danau Kota 19 Jalan Kota Raya 233 Jalan Matahari 98 Jalan Enau 011-345 013-456 183 Aliya Hamidi 184 Kayla Adila 11001 175 01/OCT/17 30/NOV/17 10 018-567 SQL> SELECT * FROM registration; STUDNO COURSENO REGDATE SEMESTER SESSION 11001 182 01/OCT/18 30/NOV/18 9.5 11031 175 01/MAR/18 30/APR/18 8 175 11031 9 1100 5/SEP/17 1103 3/FEB/18 1 2017/2018 2 2017/2018 176 01/MAR/18 30/APR/18 182 01/MAR/19 12/APR/19 175 11031 8.5 176 11037/FEB/18 2 2017/2018 1 2018/2019 182 1100 2/SEP/18 1103 6/FEB/19 182 2 2018/2019 183 1103 4/FEB/19 2 2018/2019 --- QUESTION BEGINS HERE --- 1. Write a PL/SQL script to create a FUNCTION that calculates the cost each studenti courses taken. Below is the detail of the cost for each course: (5 pts) COURSE CHARGE PER NO COURSE (RM) SQL> SELECT * FROM course; COURSENO COURSENAME CREDITHOUR LEVEL 1100 110.50 1103 150.10 3 1 1707 180.50 3 1 2302 200.20 1100 PROGRAMMING 1103 DATABASE 1707 MATHEMATICS 2302 WEB TECHNOLOGIES 3102 DATA WAREHOUSING 3 1 3102 250.20 2 3 3 3 --- QUESTION BEGINS HERE --- 1. Write a PUISQL Anonymous Block to list the detail of the students of a certain course. Allow the user to enter the COURSE NAME. Hint: Use CURSOR (10 pts): Expected Output: Enter the name of the course: database List of students for DATABASE 1.175 Ali Ahmad 2.176 Hanna Syamil 3. 182 Ibnu Hassan 4. 103 Aliya llamidi PL/SQL procedure successfully completed. OR Expected Output: Enter the name of the course: PROGRAMMING List of students for PROGRAMMING 1.175 Ali Ahmad 2. 182 Ibnu Hassan PL/SQL procedure successfully completed. 2. Call the function from an anonymous block to allow the user to key in the student ID (studno). Expected Output: SQL> @d:/function_fee.sql Enter the student ID: 175 The total amount to be paid for Ali Ahmad is RM 260.60 PLISQL procedure successfully completedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started