written 2.5 years ago by | modified 2.5 years ago by |

Suppose a key value is 9 bytes, pointer is 7 bytes and page size is 512 bytes. How many key values you can enter in a leaf and non-leaf node of a B+ tree?

**1 Answer**

0

749views

How many key values you can enter in a leaf and non-leaf node of a B+ tree?

written 2.5 years ago by | modified 2.5 years ago by |

Suppose a key value is 9 bytes, pointer is 7 bytes and page size is 512 bytes. How many key values you can enter in a leaf and non-leaf node of a B+ tree?

ADD COMMENT
EDIT

1

47views

written 2.5 years ago by | • modified 2.5 years ago |

*Given data for B+ Tree -*

Page Size of Data = **D = 512 byte**

Pointer = **B = 7 byte**

Key Valye = **K = 9 byte**

*To find -*

**How many key values you can enter in a leaf and non-leaf node of a B+ tree = ?**

*Formula -*

$$p * B + (p - 1)*K \le D$$

Where,

** p** represents the

*Solution -*

$$p * B + (p - 1)*K \le D$$

$$p * 7 + (p - 1)*9 \le 512$$

$$7p + 9p - 9 \le 512$$

$$7p + 9p \le 521$$

$$16p \le 521$$

$$p \le 32.56$$

$$p = 32$$

Therefore,

Total **32 key values** can be entered in a leaf and non-leaf node of a B+ tree.

ADD COMMENT
EDIT

Please log in to add an answer.