Consider a relational database for a university registrar's office.
The relations are student, class, instructor, teaches, and taking.
The schemes of these relations are:
Student-scheme = (name, standing, student-num, gpa)
Class-scheme = (schedule-num, semester, department, number, days, time, place,
enrollment)
Instructor-scheme = (name, department, office)
Teaches-scheme = (name, office, schedule-num, semester)
Taking-scheme = (student-num, schedule-num, semester, grade)
where the value of attribute standing is one of {freshman, sophomore,
junior, senior}, and the schedule-num attribute of Class-scheme,
Teaches-scheme and Taking-scheme is a unique number used to identify a
particular section of a course (i.e. each course or section of a course has
a unique schedule number), and the semester attribute of these relations
identifies the year and semester of the course (i.e. Spring 1997).
The teaches relation is intended to represent relationships between
instructors and classes, and the taking relation is intended to represent
relationships between students and classes.
Note that Student-scheme now has a gpa attribute. The domain of gpa is
real numbers from 0.0 to 4.0.
Express each of the following queries in SQL-92: