GATE CS 2022 · Question 25 · Databases · Multiple select (MSQ) · 1 mark · no negative marks

Consider the following three relations in a relational database.
Employee(eId, Name), Brand(bId, bName), Own(eId, bId)
Which of the following relational algebra expressions return the set of eIds who own all the brands?

  1. (A) Π_(eId)(Π_(eId,bId)(Own) / Π_(bId)(Brand))
  2. (B) Π_(eId)(Own) - Π_(eId)((Π_(eId)(Own) × Π_(bId)(Brand)) - Π_(eId,bId)(Own))
  3. (C) Π_(eId)(Π_(eId,bId)(Own) / Π_(bId)(Own))
  4. (D) Π_(eId)((Π_(eId)(Own) × Π_(bId)(Own)) / Π_(bId)(Brand))
Answer

Answer (A), (B)

Answer from the official GATE CS 2022 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes