Tasks | Timing |
---|---|
Quiz 7 | 10 min |
Task 1 | 40 min |
Task 2 | 40 min |
Write a function teatching_load() that takes an instructor id as an argument and finds the sum of all course hours(credits in our case) that instructor taught. Then write another function that uses the first one, to update all instructors’ salary using this equation: new salary = old salary+ [old salary * sum of his course hours *0.001].
Create a new trigger, that inserts the old budget into the department_budget_audits
table including dept_name, old budget and the time of change when the budget of a department changes. (Create the table and any other necessary objects. Also provide some test pictures.)
Show how to enforce the constraint “a student cannot take two different sections in a semester in the same time slot.” using a trigger (remember that the constraint can be violated by changes to the takes relation as well as to the section relation).
available_classrooms
” that shows all available classrooms in all semesters along with their sections and time slots. An available classroom is a classroom with a section having enrollments that didn't exceed its classroom capacity.1 + max (sec_id)
for all sections offered for that particular course.max (time_slot_id)
for all course sections. Then choose the id equal to x+1
(that is; for A choose B, and for C choose D and so on).Database Systems
IUG
Computer Engineering