Question: For this question and the next one, consider the following relational schema: student ( snum , sname, year ) professor ( pnum , pname, office,

For this question and the next one, consider the following relational schema:
student(snum, sname, year)
professor(pnum, pname, office, dept)
course(cnum, cname)
class(cnum, term, section, instructor)
schedule(cnum, term, section, day, time, room)
enrollment(snum, cnum, term, section)
The relation student stores information on students. snum is the student id, sname is the student
name, and year is the student's year in their program (1 to 4).
The relation professor stores information on professors. pnum is an id for the professor. pname and
office are the name of a professor and their office, respectively. dept indicates the department with
which a professor is affiliated.
The course relation stores course numbers (cnum) and names (cname).
Classes taught are stored in the class relation. A class is a section of a course taught in a particular
term. A class is taught by exactly one professor.
The schedule relation keeps track of the time and place a class is held.
The enrollment relation records the students enrolled in a class.
For each relation, the underlined attributes form the primary key.
The attributes cnum and instructor in the class relation are foreign keys referencing the course and
professor relations, respectively.
The attribute cnum in the schedule relation is a foreign key referencing the course relation.
The attributes snum and cnum in the enrollment relation are foreign keys referencing the student and
course relations, respectively.
The attributes cnum, term, and section in the enrollment relation together form a foreign key refer-
encing the Class relation.
You may assume the domains of days and time are {M,T,W,R,F} and ,
13:00,dots,19:00, respectively. The domain of term consists of strings of length 3, where the first
character represents the term while the last two digits indicate the year (e.g.,'F11'). The domain of
section is a single integer from 1 to 9. You may assume that every course in course relation has been
offered at least once.
Express the following queries in relational algebra. (5 points each)
(a) Find the student ids and names of students who took a course taught by the professor whose name
is 'Tarski'.
(b) Find the student ids and names of students who have classes on Tuesday and Thursday in the
'F24' term.
(c) Find the student ids and names of students who enrolled in all sections of courses taught by the
professor whose name is 'Tarski' in the 'F24' term. Assume that Tarski does not teach two sections
of the same course in 'F24'.
(d) Find the names of students who did not take any classes in the 'W23' term.
For this question and the next one, consider the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!