Question 3 (Total 48 Points): SQL Queries:
Given the following schema. Primary keys are in italics/underlined and foreign keys are
bold. The meaning of the relations is straightforward.
Student(snum, sname, major, level, age)
Class(cname, time, room, facid)
Enrolled(snum, cname, grade)
Faculty(facid, fname, lname, middleInitial, deptid)
Department(deptid, deptname, numFaculty)
Write SQL queries to answer the following questions:
3.1) (12 Points) Find the Student Name, Age, Faculty Name of all seniors (level = SR) who
are enrolled in a class taught by faculty 'Robert E Schmidt'.
3.2) (12 Points) Create a view called 'Class Teachers'. This view includes a list of all course
names along with First and Last Name of the faculty who teaches this course. (i.e., view
output includes cname and fname), only where number of Faculty is less than 2.