390 views
1 1 vote

Consider the following relational schemas
Student (studId, name, age, year, sex, deptNo, supervisorId)
Professor(eId, name, sex, startyear, deptId, phoneNo)
Course(courseId, courseName, points, deptId)
enroll(studId, courseId, sem, year, marks)
teaching(eid, courseId, sem, year). Write TRC for the following query

List the names of students who have not taken at least one course taught by their supervisor

  1. {s.name | student(s) ∧ (∃e) (∃t)(enroll(e) ∧ teaching(t) ∧ e.courseId ≠ t.courseId ∧ e.studId ≠ s.studId ∧ t.eid = s.supervisorId)}
  2. {s.name | student(s) ∧ (∀e) (∀t)(enroll(e) ∧ teaching(t) ∧ e.courseId = t.courseId ∧ e.studId = s.studId ∧ t.eid = s.supervisorId)}
  3. {s.name | student(s) ∧ ~(∃e) ~(∃t)(enroll(e) ∧ teaching(t) ∧ e.courseId = t.courseId ∧ e.studId = s.studId ∧ t.eid = s.supervisorId)}

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
0 0 answers
346
346 views
punit dubey asked Sep 11, 2018
346 views
1 1 vote
2 2 answers
2.7k
2.7k views
Harsh Kumar asked Jul 2, 2018
2,688 views
Relation Schema : Employee (Name, Ssn, Bdate, Address, Dept_number)Project (Pname, Pno, Dept_number)WorksOn (Essn, Pno, Hours)List the names of employees who work on all ...