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:
studentsnum sname, year
professorpnum pname, office, dept
coursecnum cname
classcnum term, section, instructor
schedulecnum term, section, day, time, room
enrollmentsnum 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 to
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 and
:dots,: respectively. The domain of term consists of strings of length where the first
character represents the term while the last two digits indicate the year egF The domain of
section is a single integer from to You may assume that every course in course relation has been
offered at least once.
Express the following queries in relational algebra. 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
F 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 F term. Assume that Tarski does not teach two sections
of the same course in F
d Find the names of students who did not take any classes in the W term.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
