Question: Objective: In this assignment, you will create a MySQL stored procedure to determine whether a specific student has passed or failed based on their grade
Objective:
In this assignment, you will create a MySQL stored procedure to determine whether a specific student has passed or failed based on their grade point average GPA You will use a table named 'students' containing columns for student IDs, first names, last names, and GPAs.
Instructions:
Database Setup:
Create a table named 'students' with columns:
idINT primary key, autoincremented
'firstname' VARCHAR
'lastname' VARCHAR
'gpa' DECIMAL
Stored Procedure Creation:
Create a stored procedure named 'DeterminePassFail'.
This stored procedure should take one parameter, 'studentidINT representing the ID of the student to analyze.
Inside the stored procedure, retrieve the student's name and GPA from the 'students' table based on the provided 'studentid
Determine whether the student has passed or failed based on their GPA. Consider a passing grade to be a GPA of or higher.
Print or return the full name of the student along with their passfail status.
I've provided some suggested pseudo code to help design your stored procedure.
Testing:
Insert sample data into the 'students' table to test the stored procedure. Be sure to enter students with grades higher than and also lower than
Call the 'DeterminePassFail' stored procedure with different student IDs to verify that it correctly determines passfail status.
Submission:
COPY the SQL Query Editor content containing the table creation statement, stored procedure creation statement, sample data insertion statements, and any testing queries used, and paste in a text editor, and submit as a doc, docx, txtpdf
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
