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:
'id'(INT, primary key, auto-incremented)
'first_name' (VARCHAR(50))
'last_name' (VARCHAR(50))
'gpa' (DECIMAL(5,2))
Stored Procedure Creation:
Create a stored procedure named 'DeterminePassFail'.
This stored procedure should take one parameter, 'student_id'(INT), 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 'student_id'.
Determine whether the student has passed or failed based on their GPA. Consider a passing grade to be a GPA of 60 or higher.
Print or return the full name of the student along with their pass/fail 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 60 and also lower than 60.
Call the 'DeterminePassFail' stored procedure with different student IDs to verify that it correctly determines pass/fail 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, .txt,.pdf.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!