CS FundamentalsHardGATE CS · PSU (ISRO/BARC)
A B+ tree index uses 512-byte blocks, 8-byte search keys, 4-byte block pointers and 6-byte record (data) pointers. Each leaf also keeps one block pointer to the next leaf. What is the maximum number of keys a LEAF node can hold?
- A. 42
- B. 43
- C. 36
- D. 35
Correct answer: C. 36
A leaf holds q (key, record-pointer) pairs plus one next-leaf pointer: 14·q + 4 ≤ 512 gives q = ⌊(512 − 4)/14⌋ = 36. Using the block-pointer size or forgetting the sibling pointer gives the traps.
More DBMS and SQL questions
- R(A, B) = {(1, 3), (3, 2), (3, 4), (4, 2)} and S(B, C) = {(2, 5), (2, 7), (3, 6), (3, 7), (4, 5)}. How many tuples does σ{R.B ≠ S.B}(R ×…
- A query optimizer rewrites σ{city='Pune'}(Customer ⋈ Orders) as σ{city='Pune'}(Customer) ⋈ Orders, where city is an attribute of Customer…
- Which change is an example of PHYSICAL data independence in the three-schema architecture?
- Teach(course, teacher, book) satisfies course ↠ teacher | book, and the course DBMS has 3 teachers and 4 books. How many tuples must Teach…
- For the schedule R1(B), R1(C), W3(A), W1(C), R2(A), W2(C), R3(B), how many distinct serial schedules are conflict-equivalent to it?
- For the schedule R1(B), W3(A), W1(B), W2(B), R2(A), W3(C), R3(C), R2(C), how many distinct serial schedules are conflict-equivalent to it?