Question: Given below table : Student(StuID, StuName) Module(ModName, ModID) Marks(ModID, StuID, Year, Coursework1, Coursework2, Coursework3, Coursework4, Exam1, Exam2, Total) To write a procedure in SQL Server

Given below table :

Student(StuID, StuName)

Module(ModName, ModID)

Marks(ModID, StuID, Year, Coursework1, Coursework2, Coursework3, Coursework4, Exam1, Exam2, Total)

To write a procedure in SQL Server with a cursor to display the grade obtained, module name and student name for each student by adding a weightage to each category of marks.

This procedure takes as input the module code, the weight for coursework. It will display the grades for students for a specific module based on total marks

Example : (Coursework + Coursework2 + Coursework3 + Coursework4)*weightage = TotalB

(Exam1 + Exam2)*(100-weightage) = TotalA

Note : The weightage is also a value to be inserted by the user

TotalMarks = TotalB + TotalA

Gradings are as follows:

Total marks >80 = A+

Total marks between 70 and 79.9= A

Total marks between 60 and 69.9= B

Total marks between 50 and 59.9= C

Total marks less than 50 = F

Example of output should be like :

John got B in module

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 Databases Questions!