B+ Tree and Insertion in B+ Tree
• Database Management Systems (DBMS)
• Presented by: Your Name
• Institute: Your Institute Name
• Date: Presentation Date
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.
Why Use B+ Tree?
• • Efficient disk access.
• • Supports range queries.
• • Balanced structure ensures O(log n)
performance.
• • Sequential access via linked leaves.
Structure of B+ Tree
• • Internal nodes: keys + pointers.
• • Leaf nodes: actual data + pointers.
• • Linked leaf nodes for fast traversal.
• • Uniform depth across all leaves.
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.
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.
Insertion – Step-by-Step Example
• Order = 3 (max 2 keys/node):
• • Insert 10 → [10]
• • Insert 20 → [10, 20]
• • Insert 5 → [5, 10, 20] → Split: [5], [10, 20],
Promote 10
• • Insert 30 → [10, 20, 30] → Split: [10], [20,
30], Promote 20
Visualizing Insertion
• Include diagrams to illustrate:
• - Before and after insertions
• - Node splits
• - Key promotions
Advantages of B+ Tree
• • O(log n) search time.
• • Efficient for range queries.
• • Balanced and consistent performance.
• • Internal nodes guide search only.
B+ Tree vs B Tree
• B Tree:
• - Data in internal & leaf nodes
• - No linked leaves
• B+ Tree:
• - Data in leaf nodes only
• - Leaves linked for range access
Applications of B+ Tree
• • Database indexing
• • File systems (e.g., NTFS, ext4)
• • Multilevel indexing
• • OS file management
Conclusion
• • B+ Tree ensures efficient data
storage/retrieval.
• • Supports quick searches and range queries.
• • Key structure for DBMS indexing.
Q&A
• Any questions?
• Thank you for your attention!

BPlus_Tree_Presentation_for_DBMS_Indexing.pptx

  • 1.
    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.
  • 7.
    Insertion – Step-by-StepExample • Order = 3 (max 2 keys/node): • • Insert 10 → [10] • • Insert 20 → [10, 20] • • Insert 5 → [5, 10, 20] → Split: [5], [10, 20], Promote 10 • • Insert 30 → [10, 20, 30] → Split: [10], [20, 30], Promote 20
  • 8.
    Visualizing Insertion • Includediagrams to illustrate: • - Before and after insertions • - Node splits • - Key promotions
  • 9.
    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.
  • 13.
    Q&A • Any questions? •Thank you for your attention!