CS FundamentalsVery hardGATE CS · PSU (ISRO/BARC)
Keys 7, 53, 17, 43, 38, 5, 27, 50, 47, 10 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. 5 leaves, height 2
- B. 3 leaves, height 2
- C. 4 leaves, height 3
- D. 4 leaves, height 2
Correct answer: D. 4 leaves, height 2
Simulating the splits gives leaves 5,7,10 | 17,27,38 | 43,47 | 50,53 and root keys [17, 43, 50], 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) has 8 tuples. What is the number of tuples in R ⋈ R (natural join of R with itself), and in R × ρ{S(C, D)}(R)?
- R(A, B, C, D, E, F) has FDs B → AC, E → F, EF → BD, F → E. Each option is a relation schema obtained by projecting R, with the…
- On R(A, B, C, D, E), F = {D → A, B → AE} and G = {BE → A, D → A, B → E}. Which statement is correct? ("F covers G" means every FD of G is…
- 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'…
- A multilevel index is built over a first level of 250,000 index entries; every index block holds 68 entries (fan-out 68), and levels are…