CS FundamentalsHardGATE CS
Relations R (800 blocks) and S (300 blocks) are joined by block nested-loop join with 52 buffer blocks (one for output, one for the inner relation, the rest for the outer). What is the minimum number of block transfers, ignoring the output?
- A. 5,100
- B. 5,600
- C. 3,300
- D. 4,300
Correct answer: A. 5,100
With S outer: 300 + ⌈300 / 50⌉ × 800 = 300 + 6 × 800 = 5,100. With R outer: 800 + ⌈800 / 50⌉ × 300 = 5,600. The smaller relation should be the outer one.
More DBMS and SQL questions
- R has 10,000 tuples in 500 blocks and is the outer relation of an indexed nested-loop join with S. S has a B+ tree on the join attribute…
- A sorted file has 60,000 records of 200 bytes stored unspanned in 4096-byte blocks. A sparse primary index has 20-byte entries (one per…
- R has 2000 tuples and S has 5000 tuples. The join attribute A has 50 distinct values in R and 200 in S. Under the usual uniformity and…
- R(S, C) = {(1, a), (1, b), (2, a), (3, a), (3, b), (3, c), (4, b)}. What is R ÷ πC(σ{S = 1}(R))?
- An ER diagram has entity Employee (key eid, composite attribute name, multivalued attribute phone), weak entity Dependent (partial key…
- A ternary relationship Supplies links Supplier, Part and Project, and the rule is: for a given project and part there is at most one…