Assignment #7
Roles and Privileges
Create two roles: REGISTRAR and INSTRUCTOR. Then create the following views and assign select rights on
each set of views to the roles they are listed under:
1. REGISTRAR
2. INSTRUCTOR
ROSTER: all students in classes taught. Assume that instructors have Oracle accounts that they
run the view from and that their login ids match their last names.
ASSIGNMENTS: all sections taught by the instructor
Finally, grant the registrar role to Mitch (murov_m) instructor role to Mitch (murov_m). This is my user id
SELECT s.course_no, c.description,
s.capacity-count(e.student_id) seatsavail
FROM enrollment e, section s, course c
WHERE s.course_no = c.course_no
AND e.section_id = s.section_id
st.last_name last, e.student_id
FROM student st, enrollment e, section s, instructor i
WHERE st.student_id = e.student_id
AND e.section_id = s.section_id
AND s.instructor_id = i.instructor_id