2,306 views

2 Answers

1 votes
1 votes
For B Tree, each node will contain 3 pointers - block pointer, record pointer and key pointer

Block pointer will point to the child of the B tree, Record pointer will point to the the actual data of the node and key pointer will point to the key of the actual data. All the nodes of a B-tree will have all 3 pointers.

For a k-way B-tree, there will be k pointers pointing to the child nodes(block pointer) and k-1 pointer holding the key along with the data(record pointer and key pointer)

So, any node of size N of a k-way tree will have the formula:

k*(block pointer) + k-1*(record pointer + key pointer) = N

 

For B+ tree, the internal nodes will contain only the block pointers to point to their children and key pointers to point to point to the keys. All the actual data in a B+ Tree is present on the leaf nodes so no record pointers will be there in the internal nodes. So the formula will be,

k*(block pointer) + k-1*(key pointer) = N

For any leaf node of a B+ tree, the formula will be same as that of a B-tree

Related questions

1 votes
1 votes
0 answers
1
newdreamz a1-z0 asked Jan 2, 2019
505 views
For range queries every B+ tree index requires less I/O than a full table scan.can anyone explain?
1 votes
1 votes
2 answers
2
Shivani gaikawad asked Oct 27, 2018
424 views
0 votes
0 votes
1 answer
3
iarnav asked Dec 15, 2017
1,405 views
Does values in Leaf nodes of B+ tree repeats or ever leaf node has an unique value?
1 votes
1 votes
1 answer
4
Pawan Kumar 2 asked Dec 7, 2017
1,029 views
$\text{Insertion Sequence}$ : $8,5,1,7,3,12,9,6$Can someone plz show the Sequence of insertion in B+ tree step by step Thanks