Post date: Nov 27, 2016 8:25:28 AM
Interesting Resources:
https://code.tutsplus.com/articles/an-introduction-to-stored-procedures-in-mysql-5--net-17843
http://www.mysqltutorial.org/getting-started-with-mysql-stored-procedures.aspx
Lab Exercise:
student(id, name, average)
assessment(id, name, max_grade)
grade_report(id_student, id_course, id_assessment, grade)
course(id, title)
Create the above database along with the triggers in order to:
update the student.average when a record is added, updated or deleted in grade_report.
update grade_report.grade if the entered value is negative or greater that the assessment.max_grade
For simplicity, we assume that all assessments are out of 100 (max_grade = 100)