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?
- (A) Π_(eId)(Π_(eId,bId)(Own) / Π_(bId)(Brand))
- (B) Π_(eId)(Own) - Π_(eId)((Π_(eId)(Own) × Π_(bId)(Brand)) - Π_(eId,bId)(Own))
- (C) Π_(eId)(Π_(eId,bId)(Own) / Π_(bId)(Own))
- (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