B+ Tree andInsertion in B+ Tree
• Database Management Systems (DBMS)
• Presented by: Your Name
• Institute: Your Institute Name
• Date: Presentation Date
2.
Introduction to B+Tree
• • A B+ Tree is a balanced tree used in DBMS
and file systems.
• • Maintains sorted data with efficient
insertion, deletion, and search.
• • Stores all data in leaf nodes; internal nodes
are for indexing.
3.
Why Use B+Tree?
• • Efficient disk access.
• • Supports range queries.
• • Balanced structure ensures O(log n)
performance.
• • Sequential access via linked leaves.
4.
Structure of B+Tree
• • Internal nodes: keys + pointers.
• • Leaf nodes: actual data + pointers.
• • Linked leaf nodes for fast traversal.
• • Uniform depth across all leaves.
5.
Properties of B+Tree
• • Order (m): Max children per node.
• • Internal nodes: ≤ m children, ≥ m/2 .
⌈ ⌉
• • Leaf nodes: ≤ m-1 keys, ≥ (m-1)/2 .
⌈ ⌉
• • Root has ≥ 2 children if not leaf.
6.
Insertion in B+Tree – Overview
• 1. Locate the correct leaf node.
• 2. Insert key in sorted order.
• 3. Handle overflow via split & promote.
• 4. Split parent if needed.
• 5. Create new root if required.
Advantages of B+Tree
• • O(log n) search time.
• • Efficient for range queries.
• • Balanced and consistent performance.
• • Internal nodes guide search only.
10.
B+ Tree vsB Tree
• B Tree:
• - Data in internal & leaf nodes
• - No linked leaves
• B+ Tree:
• - Data in leaf nodes only
• - Leaves linked for range access
11.
Applications of B+Tree
• • Database indexing
• • File systems (e.g., NTFS, ext4)
• • Multilevel indexing
• • OS file management
12.
Conclusion
• • B+Tree ensures efficient data
storage/retrieval.
• • Supports quick searches and range queries.
• • Key structure for DBMS indexing.