I am learning dynamic tree-structure organizations and how to design databases.
Consider a DBMS with the following characteristics :
- file pages with size 2048 bytes
- pointers of 12 bytes
- page header of 56 bytes
A secondary index is defined on a page of 8 bytes. What would be the maximum number of records that can be indexed with a three levels B-tree? And with a three levels B+tree ?
Here are two examples of these trees :
My attempt
B+trees
I have read that
B+ trees are shallower than a B tree. because only the set of the highest key denoted as k in each leaf node except the last one, is stored in the non-leaf nodes, organized as a B-tree. Relational DBMS Internals, chapter 5: Dynamic Tree-Structure Organizations, p.46
Therefore there is a difference, something we store in the nodes in a B tree is stored in the leaves in a B+ tree. Thus, to my mind it was (m-1)h (m being the order and h being the height) as far as each nodes contains at most (m-1) keys to another node. But this is not linked with the number of bytes.
Yet I found in the book mentioned above the following table :
Therefore would it be 203.7 number of records ?
B trees
For them, as far as some values are stored in the node, I have to do a division by the number of nodes. And I'm stuck there.