CS FundamentalsHardGATE CS · PSU (ISRO/BARC)
R(A, B) = {(a1, b1), (a1, b2), (a2, b2), (a2, b3), (a3, b1), (a3, b2), (a4, b1), (a4, b2), (a4, b3)} and S(B) = {b1, b3}. What is R ÷ S?
- A. {a4}
- B. {a1, a2, a3}
- C. {a1, a2, a3, a4}
- D. ∅
Correct answer: A. {a4}
R ÷ S returns the A values paired with EVERY B in S (b1, b3). The answer is {a4}; values paired with just some of them belong to the 'any' (semi-join) answer.
More DBMS and SQL questions
- What is the maximum possible number of candidate keys a relation with 6 attributes can have (over all FD sets)?
- R(A, B, C, D, E) with functional dependencies BC → A, D → B, A → D is decomposed into R1(A, C, E), R2(A, B, D). Which statement is correct?
- Relations R (400 blocks) and S (100 blocks) are joined with block nested-loop join using M = 12 buffer blocks (M − 2 for the outer…
- Table Stu(sid, sname) rows: (1, 'Om'), (2, 'Pia'), (3, 'Raj'), (4, 'Sia'). Table Takes(sid, cid, marks) rows: (1, 'C1', 80), (1, 'C2'…
- 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'…
- TS(T1) = 15, TS(T2) = 30, TS(T3) = 25; all read/write timestamps start at 0. Under basic timestamp ordering with Thomas's write rule…