Deprecated: Implicit conversion from float-string "1558764248.547" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1558764248.547" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1558764248.547" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1558764248.547" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1558764248.547" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1558764314.989" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1558764314.989" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1558764314.989" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1558764314.989" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1558764314.989" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1558754529.980" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1558754529.980" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1558754529.980" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1558754529.980" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1558754529.980" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1558761204.351" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1558761204.351" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1558761204.351" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1558761204.351" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1558761204.351" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
B+ tree / GATE Overflow for GATE CSE
3,000 views
1 votes
1 votes

Database file consists 1250 records.Block can hold either 3 record or (10 key,11 pointer ) The max number of level of index required for dense B+ tree index for daatabase file are _____________________

2 Answers

3 votes
3 votes
it is dense indexing.. so index will be created for every record

p=11

max number of nodes when all the nodes are filled with minimum number of keys

1. at leaf level number of blocks=$\left \lceil \frac{1250}{5} \right \rceil$=250

at leaves minimum occupancy=$\left \lceil \frac{p}{2} \right \rceil-1$

as the rightmost pointer points to its right sibling so we don't count it

for all other nodes min occupancy=$\left \lceil \frac{p}{2} \right \rceil$=6

2. for pre-leaf level, number of blocks=$\left \lceil \frac{250}{6} \right \rceil$=42

3. for next level number of blocks=$\left \lceil \frac{42}{6} \right \rceil$=7

4. next level, number of nodes=$\left \lceil \frac{7}{6} \right \rceil$=2

5. 1 node for root

there are 5 levels
1 votes
1 votes

Database file consists 1250 records.Block can hold either 3 record or (10 key,11 pointer ). The max number of level of index required for dense B+ tree index.

To get max number of levels in B+ tree, we will assume that each node is half full and will contain 5 keys and 6 pointers.

1st level = 1 node, 1 key, 2 pointers, ( Root node is not forced to obey this rule of min keys and pointers)
2nd level = 2 nodes, 10 keys, 12 pointers.
3rd level = 12 nodes, 60 keys, 72 pointers
4th level = 72 nodes, 360 keys, 432 pointers
5th level = 432 nodes, 2160 keys, 2592 pointers

So, as you can see if we need minimum 2160 keys then our B+ Tree can be of 5 levels, but keys are less than 2160 and more than 360, hence B+ tree will be of levels 4 only.

Hence, correct answer is 4.

edited

Related questions


Deprecated: Implicit conversion from float-string "1674994499.619" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1674994499.619" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1674994499.619" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1674994499.619" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549269994.115" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549269994.115" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549269994.115" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549269994.115" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549092421.837" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549092421.837" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549092421.837" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549092421.837" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1547000679.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1547000679.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1547000679.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1547000679.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
509
views
0 answers
0 votes
Sahil_Lather asked Jan 29, 2023
509 views
In a B+ Tree index having order 6, which is the maximum number of child pointers it can have. Keys are numbered from 1 to 83. What can be the maximum number of nodes whic...
3.2k
views
2 answers
2 votes
HeartBleed asked Feb 4, 2019
3,231 views
Which of the following is not correct about B + Tree, which is used for creating indexof relational database table?(a) Key values in each node kept in sorted order(b) Lea...
2.1k
views
3 answers
0 votes
Na462 asked Feb 2, 2019
2,130 views
383
views
0 answers
0 votes
bts1jimin asked Jan 9, 2019
383 views
Can anyone suggest me any useful source from where I can read b+ tree insertion and deletion?
Total PHP MySQL Other RAM
Time (ms) % Time (ms) % File count Time (ms) % Query count Time (ms) % Amount %
Setup 5.6 6% 4.2 4% 72 1.8 2% 2 0.0 0% 569k 39%
Control 13.3 15% 1.8 2% 5 11.8 13% 12 0.0 0% 339k 23%
View 4.8 5% 4.8 5% 12 0.0 0% 0 0.0 0% 170k 11%
Theme 55.4 63% 8.2 9% 15 47.4 54% 3 0.0 0% 360k 25%
Stats 8.0 9% 0.1 0% 0 7.9 9% 1 0.0 0% 0k 0%
Total 87.2 100% 19.1 21% 104 68.9 79% 18 0.0 0% 1440k 100%