Skip to content
GATEiit

GATE CSE 2022 Q25: Relational algebra for employees who own all brands

Question

Consider the following three relations in a relational database.

Employee(eId‾,Name)Employee(\underline{eId}, Name), Brand(bId‾,bName)Brand(\underline{bId}, bName), Own(eId‾,bId‾)Own(\underline{eId}, \underline{bId})

Which of the following relational algebra expressions return the set of eIdeIds who own all the brands?

Try it: multiple select: one or more correct options

Select one or more options
Select all correct options. No negative marking, no partial marks.
Show answer and explanation

Answer: A, B (official GATE 2022 final answer key)

Concept used: "Owns all brands" is relational division by the set of all brand ids, which can also be written with product and difference.

First step: Check what each divisor is: all brands (from BrandBrand) or only the brands someone owns (from OwnOwn).

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2022 CS question paper and final answer key, organised by IIT Kharagpur. Question paper · Answer key