CS FundamentalsVery hardGATE CS · DBMS
Keys 7, 31, 43, 34, 16, 26, 39, 38, 29, 44 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. 4 leaves, height 2
- B. 4 leaves, height 3
- C. 3 leaves, height 2
- D. 5 leaves, height 2
Correct answer: A. 4 leaves, height 2
Simulating the splits gives leaves 7,16 | 26,29,31 | 34,38 | 39,43,44 and root keys [26, 34, 39], so 4 leaves at height 2.
More DBMS and SQL questions
- Table Acct(no, branch, bal) rows: (101, 'Agra', 500), (102, 'Agra', 1500), (103, 'Bhopal', 700), (104, 'Bhopal', 700), (105, 'Cuttack'…
- Which ACID property is primarily the responsibility of the application programmer (together with declared integrity constraints), rather…
- R(A, B, C, D, E) has functional dependencies DE → B, CE → A, AC → BE. How many superkeys does R have?
- Σ = {C → A, AB → D, BC → D, A → B, D → B} on R(A, B, C, D, E). Exactly one FD in Σ is redundant (it can be derived from the others). Which…
- R(A, B, C, D, E, F) has functional dependencies B → ACDF, A → B. How many superkeys does R have?
- R(A, B) = {(2, 1), (3, 1), (3, 3), (3, 4), (4, 4)} and S(B, C) = {(1, 5), (2, 5), (2, 7), (3, 7)}. How many tuples are in R ⟕ S (left…