Set-Theory
November 16, 2023Question 3438 – Research Aptitude
November 16, 2023Database-Management-System
Question 20 |
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
20 | |
22 | |
23 | |
32 |
Question 20 Explanation:
Let k = key_ptr_size
r = record_ptr_size
b = block_ptr_size
(p – 1) (k + r) + p × b ≤ 512
(p – 1) (10 + 8) + p × 5 ≤ 512
23p ≤ 530
p ≤ 23.04
So, maximum value of p possible will be 23.
r = record_ptr_size
b = block_ptr_size
(p – 1) (k + r) + p × b ≤ 512
(p – 1) (10 + 8) + p × 5 ≤ 512
23p ≤ 530
p ≤ 23.04
So, maximum value of p possible will be 23.
Correct Answer: C
Question 20 Explanation:
Let k = key_ptr_size
r = record_ptr_size
b = block_ptr_size
(p – 1) (k + r) + p × b ≤ 512
(p – 1) (10 + 8) + p × 5 ≤ 512
23p ≤ 530
p ≤ 23.04
So, maximum value of p possible will be 23.
r = record_ptr_size
b = block_ptr_size
(p – 1) (k + r) + p × b ≤ 512
(p – 1) (10 + 8) + p × 5 ≤ 512
23p ≤ 530
p ≤ 23.04
So, maximum value of p possible will be 23.
Subscribe
Login
0 Comments