Question: Please write a stored procedure named pHW _ 6 _ xxxx ( student ) which will display the student s transcript by the input (
Please write a stored procedure named pHWxxxx student which will display the students transcript by the input semester yearYour program needs to meet the following requirements and test cases.
a If the input year is the report should have all students for all years.
b If the input semester is the report should have all the terms in that year.
c If the input semester or year is empty or null, a corresponding error message should be printed.
d If there is no student for the input semesteryear the output message should say year xxxx semester zzzz has no students in the system
e If there are students found for the input semesteryear print the report with the format based on the test cases.
f The report should be sorted by the students last name, firstname from A to Z year from low to high, semester from spring to fall.
g Please refer to Students, Courses, StudentsCourses tables that is within the CPSS database.
i Please keep the sql simple and no hard coding!
Data entry validation for year.
call pHWdemo;
call pHWdemoFall null;
Data entry validation for semester.
call pHWdemo;
call pHWdemonull;
The message when no students are found.
call pHWdemo;
call pHWdemoSpring;
A report shows students for a specific semester and year.
call pHWdemoFall;
A report shows the students for all semesters in a specific year.
call pHWdemo;
A report shows all students for all semesters and years.
call pHWdemo;
Here is the information stored in the Students table within the dreamhome database
'Sarah', 'Lee', IT
'Helen', WuCS
'Andrew', 'Lin', 'Biology',
'Claudia', 'Lee', 'Math',
'Mary', 'Smith', IT
'Austin', 'Huang', CS
This is describing the Courses table;
Field, Type, Null, Key, Default, Extra
'coursename','varchar'YES',NULL,
'courseid'intNO'PRI',NULL,
'coursecode','varchar'YES',NULL,
This is what is stored in the Courses table;
courseid coursecode, coursename
CPS'Java
CPS'Data Structure'
CPS'Web Programming'
CPS'Database Introduction'
CPS'Database Systems'
CPS'Data Mining'
This is describing the StudentsCourses table;
Field, Type, Null, Key, Default, Extra
'studentid'intNO'PRI',
'courseid'intNO'PRI',
'semester','varchar'YES',NULL,
'year','varchar'YES',NULL,
'grade','varchar'YES',NULL,
This is what is stored in the StudentsCourses table;
Studentid courseid semester, year, grade
null, null, null, null
This is describing the Students table;
Field, Type, Null, Key, Default, Extra
'studentid'intNO'PRI',NULL,
'firstname','varchar'YES',NULL,
'lastname','varchar'YES',NULL,
This is what is stored in the Students table;
Studentid firstname, lastname
'Austin','Huang'
'Claudia','Lee'
'Sarah','Lee'
'Andrew','Lin'
'Helen',Wu
The screenshot consist of the outputs that should be executed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
