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
- Consider R(A, B, C, D, E) be a relation with the following dependencies: C → F, E → A, EC → D, A → B. Which of the following is a key for R?
- Consider the following statements: A. Data transformation is involved in the Data mining process. B. Online database is used in Data wareho…
- Consider the relation T1(A, B, C, D, E) with the dependencies {EB → C, D → E, EA → B} and T2(A, B, C, D) with the dependencies {C → A, A →…
- In a relational database, which one of the following is CORRECT?
- Consider the following statements: A. A non-serial schedule is said to be conflict serializable if it is conflict-equivalent to some serial…
- What will be the right sequence of the phases of database design? A. Physical Design B. Conceptual Design C. Logical Design D. Requirement…