Skip to content
Related Articles

Related Articles

GATE | GATE-IT-2004 | Question 79

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021

Consider a table T in a relational database with a key field K. A B-tree of order p is used as an access structure on K, where p denotes the maximum number of tree pointers in a B-tree index node. Assume that K is 10 bytes long; disk block size is 512 bytes; each data pointer PD is 8 bytes long and each block pointer PB is 5 bytes long. In order for each B-tree node to fit in a single disk block, the maximum value of p is

 

 
(A) 20
(B) 22
(C) 23
(D) 32


Answer: (C)

Explanation:
key field size = 10 bytes
data pointer size = 8 bytes
block pointer size = 5 bytes

(p – 1)( key field size + data pointer size) + p * block pointer size <= 512
23p – 18 <= 512
p <= 23

 
Thus, option (C) is correct.

 
Please comment below if you find anything wrong in the above post.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!