All mock tests are FREE till 31 December — register to save your progress
Unit 4 · Database Management Systems Paper 2 CS · June 2025

Consider the following three relations: Employee(eid, eName), Comp(cid, cName), Own(eid, cid). Which of the following relational algebra expressions returns the set of eids who own all brands?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. πeid(πeid, cid(Own) ÷ πcid(Comp))

Explanation

'For all' queries use the division operator. πeid,cid(Own) ÷ πcid(Comp) returns exactly those eids that are paired with every cid in Comp. Cartesian products (×) only combine tuples and cannot express 'all'.

More Database Management Systems questions