SlideShare a Scribd company logo
1 of 17
PRESENTING YOU
TREES
• It’s an another n-ary Tree
• It actually is an optimization of B tree
• Contains root, internal nodes and leaf nodes like other Trees
• Internal nodes contains router value of data in leaves
• All data is stored at leaf level
• Leaf nodes are linked to each other
What actually is B+ Tree?
19
5 17 19 45
45
• Unlike B tree, B+ tree stores all the data on leaf level.
• They Maximize the branching factors (fanout)
• Higher branching factors allows less height
• Less height requires less disk I/O
• Which means better performance
WHY B+ Tree?
19
5 17 19 45
O(log 𝑏 𝑛)
• Every node has one more children than it has keys.
• All leaves are at the same distance from the root.
• If B+ tree has m order then
• Root: has between 2 and m children (or root could be a leaf).
• Internal Node: store up to m - 1 and have between ⎡m/2⎤ and m children.
• Leaf Nodes: where data is stored and all at the same depth, contain between
⎡L/2⎤ and L data items.
• Order Property: subtree between two keys x and y contain leaves with values v
such that x ≤ v < y
Properties of B+ Tree
y
x v y v
• Insert at bottom level
• If leaf page (node) overflows, split page and copy middle element to
next index page
• If index page (node) overflows, split page and move middle element
to next index page
Insertion Rules
• Max Order (m): 3
• Insert 5
• Insert 45
• Insert 13
Let’s do some Insertion
5
13
Split
45
13
45 13 45
• Max Order (m): 3
• Insert 5
• Insert 45
• Insert 13
• Insert 23
Let’s do some Insertion
5 45
13
4513
23
Split
45
23
4523
• Max Order (m): 3
• Insert 5
• Insert 45
• Insert 13
• Insert 23
• Insert 32
Let’s do some Insertion
5 45
13
13
23
4523
32
Split
45
32
4532
• Max Order (m): 3
• Insert 5
• Insert 45
• Insert 13
• Insert 23
• Insert 32
Let’s do some Insertion
5 45
13
13
23
23
Split
45
32
4532
23
• Delete key and data from leaf page.
• If leaf page underflows, merge with sibling and delete key in between
them.
• If index page underflows, merge with sibling and move down key in
between them
Deletion Rules
• Delete 23
Let’s apply deletion on previous tree
5 45
13
13 23 45
32
4532
2332
45
45
32
• Delete 23
• Delete 13
Let’s apply deletion on previous tree
5
13
13 45
45
32
32
32
45
45
32
Cases Insertion Deletion Searching Space
Best Ω(log 𝑏 𝑛) Ω(log 𝑏 𝑛) Ω(log 𝑏 𝑛) Ω(𝑛)
Average θ(log 𝑏 𝑛) θ(log 𝑏 𝑛) θ(log 𝑏 𝑛) θ(𝑛 + k)
Worst O(log 𝑏 𝑛) O(log 𝑏 𝑛) O(𝑏. log 𝑏 𝑛) O(𝑛 + k)
Complexities
Where b = order
n = number of keys in the tree
Comparison Analysis
Features B Tree B+ Tree
Storage
In a B tree, search keys and data
stored in internal or leaf nodes.
In a B+ tree, data stored only in leaf
nodes.
Function of leaf nodes
In B tree, the leaf node cannot
store using linked list.
In B+ tree, leaf node data are
ordered in a sequential linked list.
Search accessibility
Here in B tree the search is not that
easy as compared to a B+ tree.
Here in B+ tree the searching
becomes easy.
Redundant key
They do not store redundant search
key.
They store redundant search key.
Applications
B+ trees are used by
• NTFS, ReiserFS, NSS, XFS, JFS, ReFS, and BFS file systems for metadata
indexing
• BFS for storing directories.
• IBM DB2, Informix, Microsoft SQL Server, Oracle 8, Sybase ASE, and SQLite for
table indexes
Conclusion
B Tree
B+ Tree
It’s a Q/A time now

More Related Content

What's hot

B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data StructureAnuj Modi
 
2 3 Trees Algorithm - Data Structure
2 3 Trees Algorithm - Data Structure2 3 Trees Algorithm - Data Structure
2 3 Trees Algorithm - Data StructureTish997
 
non linear data structure -introduction of tree
non linear data structure -introduction of treenon linear data structure -introduction of tree
non linear data structure -introduction of treeSiddhi Viradiya
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures treemaamir farooq
 
trees in data structure
trees in data structure trees in data structure
trees in data structure shameen khan
 
Binary Tree in Data Structure
Binary Tree in Data StructureBinary Tree in Data Structure
Binary Tree in Data StructureMeghaj Mallick
 
THREADED BINARY TREE AND BINARY SEARCH TREE
THREADED BINARY TREE AND BINARY SEARCH TREETHREADED BINARY TREE AND BINARY SEARCH TREE
THREADED BINARY TREE AND BINARY SEARCH TREESiddhi Shrivas
 
Hashing in datastructure
Hashing in datastructureHashing in datastructure
Hashing in datastructurerajshreemuthiah
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 Data Structures - Lecture 9 [Stack & Queue using Linked List] Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]Muhammad Hammad Waseem
 
Red black tree
Red black treeRed black tree
Red black treeRajendran
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutoriallinked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy TutorialAfzal Badshah
 

What's hot (20)

B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data Structure
 
2 3 Trees Algorithm - Data Structure
2 3 Trees Algorithm - Data Structure2 3 Trees Algorithm - Data Structure
2 3 Trees Algorithm - Data Structure
 
non linear data structure -introduction of tree
non linear data structure -introduction of treenon linear data structure -introduction of tree
non linear data structure -introduction of tree
 
b+ tree
b+ treeb+ tree
b+ tree
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures tree
 
Threaded Binary Tree.pptx
Threaded Binary Tree.pptxThreaded Binary Tree.pptx
Threaded Binary Tree.pptx
 
Binary tree
Binary tree Binary tree
Binary tree
 
Trees
TreesTrees
Trees
 
Topological Sort
Topological SortTopological Sort
Topological Sort
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 
2-3 Tree
2-3 Tree2-3 Tree
2-3 Tree
 
Binary Tree in Data Structure
Binary Tree in Data StructureBinary Tree in Data Structure
Binary Tree in Data Structure
 
2 3 tree
2 3 tree2 3 tree
2 3 tree
 
THREADED BINARY TREE AND BINARY SEARCH TREE
THREADED BINARY TREE AND BINARY SEARCH TREETHREADED BINARY TREE AND BINARY SEARCH TREE
THREADED BINARY TREE AND BINARY SEARCH TREE
 
Prim's algorithm
Prim's algorithmPrim's algorithm
Prim's algorithm
 
Hashing in datastructure
Hashing in datastructureHashing in datastructure
Hashing in datastructure
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 Data Structures - Lecture 9 [Stack & Queue using Linked List] Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 
Red black tree
Red black treeRed black tree
Red black tree
 
DFS and BFS
DFS and BFSDFS and BFS
DFS and BFS
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutoriallinked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
 

Similar to B+tree Data structures presentation

tree-160731205832.pptx
tree-160731205832.pptxtree-160731205832.pptx
tree-160731205832.pptxMouDhara1
 
B TREE ( a to z concept ) in data structure or DBMS
B TREE ( a to z concept ) in data structure  or DBMSB TREE ( a to z concept ) in data structure  or DBMS
B TREE ( a to z concept ) in data structure or DBMSMathkeBhoot
 
Introduction to data structure by anil dutt
Introduction to data structure by anil duttIntroduction to data structure by anil dutt
Introduction to data structure by anil duttAnil Dutt
 
Tree Introduction.pptx
Tree Introduction.pptxTree Introduction.pptx
Tree Introduction.pptxRahulAI
 
part4-trees.ppt
part4-trees.pptpart4-trees.ppt
part4-trees.pptSuneel61
 
File Structures(Part 2)
File Structures(Part 2)File Structures(Part 2)
File Structures(Part 2)SURBHI SAROHA
 
Binary Search Tree.pptx
Binary Search Tree.pptxBinary Search Tree.pptx
Binary Search Tree.pptxRaaviKapoor
 
Balance tree. Short overview
Balance tree. Short overviewBalance tree. Short overview
Balance tree. Short overviewElifTech
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graphRai University
 
Search tree,Tree and binary tree and heap tree
Search tree,Tree  and binary tree and heap treeSearch tree,Tree  and binary tree and heap tree
Search tree,Tree and binary tree and heap treezia eagle
 
Mca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphMca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphRai University
 
Furnish an Index Using the Works of Tree Structures
Furnish an Index Using the Works of Tree StructuresFurnish an Index Using the Works of Tree Structures
Furnish an Index Using the Works of Tree Structuresijceronline
 
Bsc cs ii dfs u-3 tree and graph
Bsc cs  ii dfs u-3 tree and graphBsc cs  ii dfs u-3 tree and graph
Bsc cs ii dfs u-3 tree and graphRai University
 
data structures module III & IV.pptx
data structures module III & IV.pptxdata structures module III & IV.pptx
data structures module III & IV.pptxrani marri
 
Data structures trees - B Tree & B+Tree.pptx
Data structures trees - B Tree & B+Tree.pptxData structures trees - B Tree & B+Tree.pptx
Data structures trees - B Tree & B+Tree.pptxMalligaarjunanN
 

Similar to B+tree Data structures presentation (20)

tree-160731205832.pptx
tree-160731205832.pptxtree-160731205832.pptx
tree-160731205832.pptx
 
B TREE ( a to z concept ) in data structure or DBMS
B TREE ( a to z concept ) in data structure  or DBMSB TREE ( a to z concept ) in data structure  or DBMS
B TREE ( a to z concept ) in data structure or DBMS
 
Introduction to data structure by anil dutt
Introduction to data structure by anil duttIntroduction to data structure by anil dutt
Introduction to data structure by anil dutt
 
Tree
TreeTree
Tree
 
Tree Introduction.pptx
Tree Introduction.pptxTree Introduction.pptx
Tree Introduction.pptx
 
B+ trees and height balance tree
B+ trees and height balance treeB+ trees and height balance tree
B+ trees and height balance tree
 
part4-trees.ppt
part4-trees.pptpart4-trees.ppt
part4-trees.ppt
 
File Structures(Part 2)
File Structures(Part 2)File Structures(Part 2)
File Structures(Part 2)
 
Binary Search Tree.pptx
Binary Search Tree.pptxBinary Search Tree.pptx
Binary Search Tree.pptx
 
B+ tree.pptx
B+ tree.pptxB+ tree.pptx
B+ tree.pptx
 
A41001011
A41001011A41001011
A41001011
 
Balance tree. Short overview
Balance tree. Short overviewBalance tree. Short overview
Balance tree. Short overview
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graph
 
Search tree,Tree and binary tree and heap tree
Search tree,Tree  and binary tree and heap treeSearch tree,Tree  and binary tree and heap tree
Search tree,Tree and binary tree and heap tree
 
Mca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphMca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graph
 
B+ tree
B+ treeB+ tree
B+ tree
 
Furnish an Index Using the Works of Tree Structures
Furnish an Index Using the Works of Tree StructuresFurnish an Index Using the Works of Tree Structures
Furnish an Index Using the Works of Tree Structures
 
Bsc cs ii dfs u-3 tree and graph
Bsc cs  ii dfs u-3 tree and graphBsc cs  ii dfs u-3 tree and graph
Bsc cs ii dfs u-3 tree and graph
 
data structures module III & IV.pptx
data structures module III & IV.pptxdata structures module III & IV.pptx
data structures module III & IV.pptx
 
Data structures trees - B Tree & B+Tree.pptx
Data structures trees - B Tree & B+Tree.pptxData structures trees - B Tree & B+Tree.pptx
Data structures trees - B Tree & B+Tree.pptx
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

B+tree Data structures presentation

  • 2. • It’s an another n-ary Tree • It actually is an optimization of B tree • Contains root, internal nodes and leaf nodes like other Trees • Internal nodes contains router value of data in leaves • All data is stored at leaf level • Leaf nodes are linked to each other What actually is B+ Tree? 19 5 17 19 45 45
  • 3. • Unlike B tree, B+ tree stores all the data on leaf level. • They Maximize the branching factors (fanout) • Higher branching factors allows less height • Less height requires less disk I/O • Which means better performance WHY B+ Tree? 19 5 17 19 45 O(log 𝑏 𝑛)
  • 4. • Every node has one more children than it has keys. • All leaves are at the same distance from the root. • If B+ tree has m order then • Root: has between 2 and m children (or root could be a leaf). • Internal Node: store up to m - 1 and have between ⎡m/2⎤ and m children. • Leaf Nodes: where data is stored and all at the same depth, contain between ⎡L/2⎤ and L data items. • Order Property: subtree between two keys x and y contain leaves with values v such that x ≤ v < y Properties of B+ Tree y x v y v
  • 5. • Insert at bottom level • If leaf page (node) overflows, split page and copy middle element to next index page • If index page (node) overflows, split page and move middle element to next index page Insertion Rules
  • 6. • Max Order (m): 3 • Insert 5 • Insert 45 • Insert 13 Let’s do some Insertion 5 13 Split 45 13 45 13 45
  • 7. • Max Order (m): 3 • Insert 5 • Insert 45 • Insert 13 • Insert 23 Let’s do some Insertion 5 45 13 4513 23 Split 45 23 4523
  • 8. • Max Order (m): 3 • Insert 5 • Insert 45 • Insert 13 • Insert 23 • Insert 32 Let’s do some Insertion 5 45 13 13 23 4523 32 Split 45 32 4532
  • 9. • Max Order (m): 3 • Insert 5 • Insert 45 • Insert 13 • Insert 23 • Insert 32 Let’s do some Insertion 5 45 13 13 23 23 Split 45 32 4532 23
  • 10. • Delete key and data from leaf page. • If leaf page underflows, merge with sibling and delete key in between them. • If index page underflows, merge with sibling and move down key in between them Deletion Rules
  • 11. • Delete 23 Let’s apply deletion on previous tree 5 45 13 13 23 45 32 4532 2332 45 45 32
  • 12. • Delete 23 • Delete 13 Let’s apply deletion on previous tree 5 13 13 45 45 32 32 32 45 45 32
  • 13. Cases Insertion Deletion Searching Space Best Ω(log 𝑏 𝑛) Ω(log 𝑏 𝑛) Ω(log 𝑏 𝑛) Ω(𝑛) Average θ(log 𝑏 𝑛) θ(log 𝑏 𝑛) θ(log 𝑏 𝑛) θ(𝑛 + k) Worst O(log 𝑏 𝑛) O(log 𝑏 𝑛) O(𝑏. log 𝑏 𝑛) O(𝑛 + k) Complexities Where b = order n = number of keys in the tree
  • 14. Comparison Analysis Features B Tree B+ Tree Storage In a B tree, search keys and data stored in internal or leaf nodes. In a B+ tree, data stored only in leaf nodes. Function of leaf nodes In B tree, the leaf node cannot store using linked list. In B+ tree, leaf node data are ordered in a sequential linked list. Search accessibility Here in B tree the search is not that easy as compared to a B+ tree. Here in B+ tree the searching becomes easy. Redundant key They do not store redundant search key. They store redundant search key.
  • 15. Applications B+ trees are used by • NTFS, ReiserFS, NSS, XFS, JFS, ReFS, and BFS file systems for metadata indexing • BFS for storing directories. • IBM DB2, Informix, Microsoft SQL Server, Oracle 8, Sybase ASE, and SQLite for table indexes
  • 17. It’s a Q/A time now