Consider the following relational query on the above database: SELECT S.sname…

ISRO Scientist/Engineer SC 2015

Consider the following relational query on the above database:

SELECT S.sname
    FROM Suppliers S
        WHERE S.sid NOT IN (SELECT C.sid
                            FROM Catalog C
                            WHERE C.pid NOT IN (SELECT P.pid  
                                                FROM Parts P
                                                WHERE P.color<> 'blue'))

Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?

  1. A.

    Find the names of all suppliers who have supplied a non-blue part.

  2. B.

    Find the names of all suppliers who have not supplied a non-blue part

  3. C.

    Find the names of all suppliers who have supplied only non blue parts.

  4. D.

    Find the names of all suppliers who have not supplied only non-blue parts.

Attempted by 648 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…