Question 1
Consider the following relational schema:
mentor(mentorID, mentorName, department)
mentee(menteeID, menteeName, advisorID, rating)
advisorID is a foreign key referring to mentorID of the mentor relation. Assume that each mentor advises at least one mentee. Every mentee is required to give a rating to their mentor for feedback purposes. What does the following query return?
SELECT mentorNameFROM mentor MRWHERE NOT EXISTS (SELECT menteeIDFROM mentee MEWHERE ME.advisorID = MR.mentorIDAND ME.rating <>'BAD');Names of all the mentors with ‘GOOD’ rating from at least one of their mentees.
Names of all the mentors with ’GOOD’ rating from all their mentees.
Names of all the mentors with ‘BAD’ rating from at most one of their mentees.
Names of all the mentors with ’BAD’ rating from all their mentees.