CS FundamentalsModerateGATE CS
R(A, B) = {(1, x), (2, y), (3, z)} and S(B, C) = {(x, 5), (x, 6), (w, 7)}. How many tuples are in the natural full outer join of R and S?
- A. 5
- B. 4
- C. 6
- D. 3
Correct answer: A. 5
Matches: (1, x, 5) and (1, x, 6). Unmatched R tuples (2, y) and (3, z) are padded with NULL C, and the unmatched S tuple (w, 7) with NULL A: 2 + 2 + 1 = 5.
More DBMS and SQL questions
- Customer(cid, city) LEFT OUTER JOIN Orders(oid, cid, amt) on cid is followed by the selection amt > 100. An optimiser wants to push this…
- An ER diagram has Student (key roll, multivalued attribute phone), Course (key cid) and Faculty (key fid). Enrols is many-to-many between…
- R has 2000 tuples with 100 distinct values of attribute b; S has 5000 tuples with 250 distinct values of b. Assuming uniform values and…
- Table Bill(id, cust, region, amt) rows: (1, 'Kavi', 'E', 300), (2, 'Lata', 'W', NULL), (3, 'Kavi', 'E', 450), (4, 'Mona', 'W', 300), (5…
- Table Bill(id, cust, region, amt) rows: (1, 'Kavi', 'E', 300), (2, 'Lata', 'W', NULL), (3, 'Kavi', 'E', 450), (4, 'Mona', 'W', 300), (5…
- Table Bill(id, cust, region, amt) rows: (1, 'Kavi', 'E', 300), (2, 'Lata', 'W', NULL), (3, 'Kavi', 'E', 450), (4, 'Mona', 'W', 300), (5…