CS FundamentalsVery hardGATE CS · Product placement
Keys 4, 38, 33, 56, 40, 14, 54 are inserted in this order into an empty B+ tree where a node holds at most 2 keys; an overflowing leaf with 3 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 3 keys keeps the first 1, 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 3
- B. 4 leaves, height 3
- C. 6 leaves, height 3
- D. 5 leaves, height 2
Correct answer: A. 5 leaves, height 3
Simulating the splits gives leaves 4,14 | 33 | 38,40 | 54 | 56 and root keys [38], so 5 leaves at height 3.
More DBMS and SQL questions
- Σ = {AE → D, BC → D, C → A, A → E, D → B} on R(A, B, C, D, E). Exactly one FD in Σ is redundant (it can be derived from the others). Which…
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…
- R(A, B, C, D, E) has functional dependencies B → ACD, BC → AD, C → A. What is the closure {B}⁺?
- Which statement about the multivalued dependency X ↠ Y on R is correct?
- R(A, B, C, D, E) has the set of functional dependencies Σ = {AD → BE, D → AE, CE → D, A → B}. Which of the following FDs is NOT in Σ⁺ (not…
- A file of 2400 blocks is sorted by external merge sort with M = 6 buffer blocks (sorted runs of M blocks are created in pass 0, then (M −…