CS FundamentalsVery hardGATE CS · PSU (ISRO/BARC)
Keys 47, 46, 27, 42, 22, 7, 58, 45, 48, 51 are inserted in this order into an empty B+ tree where a node holds at most 3 keys; an overflowing leaf with 4 keys keeps the first 2 and moves the rest to a new right leaf, copying the new leaf's first key up; an overflowing internal node with 4 keys keeps the first 2, moves the next key up and puts the rest in a new right node. After all insertions, how many leaf nodes are there and what is the height (number of levels)?
- A. 3 leaves, height 2
- B. 4 leaves, height 3
- C. 5 leaves, height 2
- D. 4 leaves, height 2
Correct answer: D. 4 leaves, height 2
Simulating the splits gives leaves 7,22 | 27,42,45 | 46,47 | 48,51,58 and root keys [27, 46, 48], so 4 leaves at height 2.
More DBMS and SQL questions
- 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) = {(5, 2), (8, 1), (8, 2), (11, 1), (14, 2)}. What does πA(R) − π{R1.A}(σ{R1.A < R2.A}(ρ{R1}(R) × ρ{R2}(R))) return?
- Assertion (A): A schedule can be conflict serializable and still not be recoverable. Reason (R): Serializability concerns the order of…
- How many of these statements about two-phase locking are correct? 1. Basic 2PL guarantees conflict serializability. 2. Basic 2PL prevents…
- Table Route(src, dst, cost) rows: ('A', 'B', 5), ('B', 'C', 4), ('A', 'C', 12), ('C', 'D', 3), ('B', 'D', 9), ('D', 'A', 2). What does…
- A file of 1000 blocks is sorted by external merge sort with M = 11 buffer blocks (sorted runs of M blocks are created in pass 0, then (M −…