CS FundamentalsHardGATE CS · DBMS
R(A, B) = {(a1, b2), (a1, b3), (a2, b1), (a2, b2), (a2, b3), (a3, b1), (a4, b1), (a4, b2), (a4, b3)} and S(B) = {b1, b3}. What is R ÷ S?
- A. {a1, a2, a3, a4}
- B. {a2, a4}
- C. ∅
- D. {a2}
Correct answer: B. {a2, a4}
R ÷ S returns the A values paired with EVERY B in S (b1, b3). The answer is {a2, a4}; values paired with just some of them belong to the 'any' (semi-join) answer.
More DBMS and SQL questions
- The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values…
- Table Sale(id, rep, region, amt) rows: (1, 'Ira', 'N', 100), (2, 'Jai', 'S', 250), (3, 'Ira', 'S', NULL), (4, 'Kim', 'N', 300), (5, 'Jai'…
- R(A, B, C, D, E, F) has functional dependencies B → ACDEF. What is the highest normal form R satisfies?
- Which isolation anomaly is still possible at the SQL REPEATABLE READ level (as defined by the SQL standard)?
- A B-tree (not B+ tree) stores a record pointer with every key in every node. With 2048-byte blocks, 16-byte keys, 8-byte tree pointers and…
- Table P(x) rows: (1), (2), (2), (3), (NULL). Table Q(x) rows: (2), (3), (3), (NULL), (4). What does this query return? sql SELECT (SELECT…