ISRO Computer Science (CSE) 2013 - Question 24

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2013

Consider relational schema: Suppliers(sid, sname...), Parts(pid, pname...), Catalog(sid, pid, pcost). Query: (SELECT catalog.pid from Suppliers, Catalog WHERE Suppliers.sid = Catalog.sid) MINUS (SELECT catalog.pid from Suppliers, Catalog WHERE Suppliers.sid = Catalog.sid AND sname != 'Sachin').

  • A. Pid of parts supplied by all except Sachin
  • B. Pid of parts supplied only by Sachin
  • C. Pid of parts available in catalog supplied by Sachin
  • D. Pid of parts available in catalog supplied by all except Sachin

Answer: B. Pid of parts supplied only by Sachin

Explanation: Set A: All parts supplied by anyone. Set B: All parts supplied by anyone who is NOT Sachin. A - B = Parts supplied by (Anyone) AND NOT (Anyone who is NOT Sachin). This implies parts supplied ONLY by Sachin. If a part is supplied by Sachin and also by Rahul, it is in A. It is also in B (supplied by Rahul). So it is removed. Result contains parts supplied EXCLUSIVELY by Sachin.

| | All questions of ISRO Computer Science (CSE) 2013