CS FundamentalsHardGATE CS · DBMS
R(A, B) = {(a1, b1), (a1, b2), (a2, b1), (a2, b3), (a3, b1), (a3, b2), (a3, b3), (a4, b1), (a4, b2)} and S(B) = {b2, b3}. What is R ÷ S?
- A. ∅
- B. {a1, a2, a4}
- C. {a3}
- D. {a1, a2, a3, a4}
Correct answer: C. {a3}
R ÷ S returns the A values paired with EVERY B in S (b2, b3). The answer is {a3}; values paired with just some of them belong to the 'any' (semi-join) answer.
More DBMS and SQL questions
- Σ = {DE → C, AB → CE, D → ABE}. Consider the FD DE → C while computing a canonical cover. Which statement about extraneous attributes on…
- R(A, B, C, D, E) has functional dependencies A → D, CE → AB, AB → C, C → AB. How many prime attributes does R have?
- Classify the schedule W1(A), W3(A), R3(A), R3(B), R1(A), R2(A), R2(B).
- R(A, B, C, D, E) has functional dependencies BD → A, E → B, B → E, AD → B. Which of the following is the complete set of candidate keys of…
- Relations R (600 blocks) and S (90 blocks) are joined with block nested-loop join using M = 32 buffer blocks (M − 2 for the outer…
- Table Score(name, pts) rows: ('a', 90), ('b', 85), ('c', 90), ('d', 70), ('e', 85), ('f', 60). What does this query return? sql SELECT…