To find the employees (\(eId\)) who own all the brands, we must use relational algebra expressions that correctly capture the “for all” requirement. Such queries are typically handled using the division operator or equivalent constructions using Cartesian product and set difference.
Option (A) – Correct:
The expression
\[
\Pi_{eId}\big( \Pi_{eId,bId}(Own) \div \Pi_{bId}(Brand) \big)
\]
uses the division operator, which is specifically designed to answer queries of the form “find all \(eId\) such that for every \(bId\) in Brand, the pair \((eId, bId)\) exists in Own.”
Thus, it correctly returns the set of employees who own all brands. Hence, option (A) is correct.
Option (B) – Correct:
This option constructs the set of all possible \((eId, bId)\) pairs using
\[
\Pi_{eId}(Own) \times \Pi_{bId}(Brand)
\]
and then subtracts the pairs that actually exist in the Own relation. By removing employees who miss at least one brand and projecting appropriately, the remaining \(eId\) values correspond exactly to those who own all brands.
Although more elaborate, this expression is logically equivalent to division. Hence, option (B) is also correct.
Option (C) – Incorrect:
This expression does not correctly enforce the “owns all brands” condition. It either ignores some required brand associations or applies division in an incorrect manner, leading to incorrect results.
Option (D) – Incorrect:
Here, the use of Cartesian product and division is misplaced. The expression does not correctly compare ownership against the complete set of brands, and therefore fails to identify employees who own every brand.
Final Answer:
The correct options are (A) and (B).