CS FundamentalsHardGATE CS
A B+ tree index uses 2048-byte blocks, 16-byte search keys, 8-byte block pointers and 10-byte record pointers; a leaf also holds one 8-byte next-leaf pointer. What are the maximum internal fan-out p and the maximum keys per leaf n?
- A. p = 85, n = 78
- B. p = 86, n = 79
- C. p = 85, n = 79
- D. p = 86, n = 78
Correct answer: D. p = 86, n = 78
Internal: 8p + 16(p − 1) ≤ 2048 gives 24p ≤ 2064, p = 86. Leaf: 26n + 8 ≤ 2048 gives n ≤ 78.46, so n = 78. Writing p keys instead of p − 1 in the internal node gives the wrong 85.
More DBMS and SQL questions
- A file of 12,000 blocks is sorted by external merge sort with 25 buffer blocks: the run-creation pass makes runs of 25 blocks, and each…
- 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…
- 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))?