SlideShare a Scribd company logo
1 of 22
B- Trees
Motivation
• Large differences between time access to disk,
cash memory and core memory
• Minimize expensive access
(e.g., disk access)
• B-tree: Dynamic sets that is optimized for
disks
AB-treeis an M-way search tree with two properties :
1. It is perfectly balanced: every leaf node is at the same
depth
2. Every internal node other than the root, is at least half-
full, i.e. M/2-1 ≤ #keys ≤ M-1
3. Every internal node with k keys has k+1 non-null
children
For simplicity we consider Meven and we use t=M/2:
2.* Every internal node other than the root is at least half-
full, i.e.t-1≤ #keys ≤2t-1, t≤ #children ≤2t
B-Trees
Example: a 4-way B-tree
B-tree 4-way tree
B-tree
1. It is perfectly balanced: every leaf node is at the same depth.
2. Every node, except maybe the root, is at least half-full
t-1≤ #keys ≤2t-1
3. Every internal node with k keys has k+1 non-null children
20 40
0 5 10 25 35 45 55
20 40
0 5 25 35 45 55
10
B-treeHeight
Claim: any B-tree with nkeys, height hand minimum degree t
satisfies:
Proof:
• The minimum number of KEYS for a tree with height h is
obtainedwhen:
– The root contains one key
– All other nodes containt-1 keys
2
1
log


n
h t
B-Tree: Insert X
1. As in M-waytree find the leaf node to which Xshould be
added
2. Add X to this node in the appropriate place among the
values already there
(there are no subtrees to worry about)
3. Number of values in the node after adding the key:
– Fewer than 2t-1: done
– Equal to 2t: overflowed
4. Fix overflowed node
Fix an Overflowed
1. Split the node into three parts, M=2t:
– Left: the first t values, become a left child node
– Middle: the middle value at position t, goes up to parent
– Right: the last t-1 values, become a right child node
2. Continue with the parent:
1. Until no overflow occurs in the parent
2. If the root overflows, split it too, and create a new root node
y
… 56 98 ….
60 65 68 83 86 90
… 56 68 98 ….
60 65 83 86 90
split
J
x x
y z
Insert example
20 40 60 80
0 5 10 15 25 35 45 55 87 98
Insert 3:
20 40 60 80
0 3 5 1015 25 35 45 55
3;6  tM
62 66 70 74 78
62 66 70 74 78 87 98
61 62 66 7074 78
20 4060 80
0 3 5 10 15 25 35 45 55
Insert 61:
3;6  tM
62 66 70 74 78 87 98
20 40 60 80
0 3 5 10 15 25 35 45 55 87 98
74 7861 62 66
OVERFLOW
20 40 60 70 80
0 3 5 10 15 25 35 45 55 87 98
SPLIT IT
Insert 38:
74 7861 62 66
20 40 60 70 80
0 3 5 1015 25 35 45 55 87 98
74 7861 62 66
20 40 60 70 80
0 3 510 15 25 35 38 45 55 87 98
3;6  tM
5 20 4060 7080
Insert 4:
0 3 4 2535 38 45 55 6162 66 87 9874 7810 15
74 786162 66
20 40 60 70 80
0 3 4 510 15
25 35 38 45 55 87 98
74 7861 6266
20 40 60 70 80
25 35 38 45 55 87 98
OVERFLOW
0 3 5 10 15
SPLIT IT
OVERFLOW
SPLIT IT
3;6  tM
0 3 4 25 35 38 45 55 61 62 66 87 9874 78
60
5 20 40 70 80
10 15
5 20 40 60 70 80
0 3 4 25 35 38 45 55 61 62 66 87 9874 7810 15
OVERFLOW
SPLIT IT
3;6  tM
Complexity Insert
• Inserting a key into a B-tree of height h is done in a
single pass down the tree and a single pass up the
tree
Complexity: )(log)( nOhO t
B Vs B+ Tree
B trees
• Generalization of binary search trees
– Not binary trees
– The B stands for Bayer (or Boeing)
• Designed for searching data stored on block-
oriented devices
A very small B tree
Bottom nodes are leaf nodes: all their pointers
are NULL
In reality
In
tree
ptr
Key
Data ptr
In
tree
ptr
Key
Data ptr
In
tree
ptr
Key
Data ptr
In
tree
ptr
Key
Data ptr
In
tree
ptr
To
Leaf
7
To
leaf
16
To
Leaf
--
Null
Null
--
Null
Null
B+ trees
• Variant of B trees
• Two types of nodes
– Internal nodes have no data pointers
– Leaf nodes have no in-tree pointers
• Were all null!
B+ tree nodes
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
B+ trees
• Variant of B trees
• Two types of nodes
– Internal nodes have no data pointers
– Leaf nodes have no in-tree pointers
• Were all null!
B+ tree nodes
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
In
tree
ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Key
Data ptr
Example B+-tree
9
5
1 3 5 6 30 409 16 17
16 30
 index node
 leaf/data node

More Related Content

Similar to B trees

Presentation on b trees [autosaved]
Presentation on b trees [autosaved]Presentation on b trees [autosaved]
Presentation on b trees [autosaved]
AKASHKUMAR1542
 
btrees.ppt ttttttttttttttttttttttttttttt
btrees.ppt  tttttttttttttttttttttttttttttbtrees.ppt  ttttttttttttttttttttttttttttt
btrees.ppt ttttttttttttttttttttttttttttt
RAtna29
 
lecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminologylecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminology
KamranAli649587
 
16807097.ppt b tree are a good data structure
16807097.ppt b tree are a good data structure16807097.ppt b tree are a good data structure
16807097.ppt b tree are a good data structure
SadiaSharmin40
 

Similar to B trees (20)

b-tree.ppt
b-tree.pptb-tree.ppt
b-tree.ppt
 
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
 
Presentation on b trees [autosaved]
Presentation on b trees [autosaved]Presentation on b trees [autosaved]
Presentation on b trees [autosaved]
 
trees
trees trees
trees
 
B tree by-jash acharya
B tree by-jash acharyaB tree by-jash acharya
B tree by-jash acharya
 
btrees.ppt ttttttttttttttttttttttttttttt
btrees.ppt  tttttttttttttttttttttttttttttbtrees.ppt  ttttttttttttttttttttttttttttt
btrees.ppt ttttttttttttttttttttttttttttt
 
Btree
BtreeBtree
Btree
 
B trees
B treesB trees
B trees
 
B tree
B  treeB  tree
B tree
 
[Www.pkbulk.blogspot.com]file and indexing
[Www.pkbulk.blogspot.com]file and indexing[Www.pkbulk.blogspot.com]file and indexing
[Www.pkbulk.blogspot.com]file and indexing
 
B and B+ tree
B and B+ treeB and B+ tree
B and B+ tree
 
BTrees-fall2010.ppt
BTrees-fall2010.pptBTrees-fall2010.ppt
BTrees-fall2010.ppt
 
lecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminologylecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminology
 
B+ tree.pptx
B+ tree.pptxB+ tree.pptx
B+ tree.pptx
 
2-3 trees in c++
2-3 trees in c++2-3 trees in c++
2-3 trees in c++
 
B trees2
B trees2B trees2
B trees2
 
16807097.ppt b tree are a good data structure
16807097.ppt b tree are a good data structure16807097.ppt b tree are a good data structure
16807097.ppt b tree are a good data structure
 
Tree traversal techniques
Tree traversal techniquesTree traversal techniques
Tree traversal techniques
 
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
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures tree
 

More from AvichalVishnoi (6)

Grpahs in Data Structure
Grpahs in Data StructureGrpahs in Data Structure
Grpahs in Data Structure
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
 
Bfs dfs mst
Bfs dfs mstBfs dfs mst
Bfs dfs mst
 
Dsa sorting
Dsa sortingDsa sorting
Dsa sorting
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 

Recently uploaded

Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Call Girls in G.T.B. Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in G.T.B. Nagar  (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in G.T.B. Nagar  (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in G.T.B. Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get CytotecAbortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
gajnagarg
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
HyderabadDolls
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
HyderabadDolls
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
nirzagarg
 
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
HyderabadDolls
 

Recently uploaded (20)

Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Call Girls in G.T.B. Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in G.T.B. Nagar  (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in G.T.B. Nagar  (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in G.T.B. Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get CytotecAbortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Oral Sex Call Girls Kashmiri Gate Delhi Just Call 👉👉 📞 8448380779 Top Class C...
Oral Sex Call Girls Kashmiri Gate Delhi Just Call 👉👉 📞 8448380779 Top Class C...Oral Sex Call Girls Kashmiri Gate Delhi Just Call 👉👉 📞 8448380779 Top Class C...
Oral Sex Call Girls Kashmiri Gate Delhi Just Call 👉👉 📞 8448380779 Top Class C...
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 

B trees

  • 2. Motivation • Large differences between time access to disk, cash memory and core memory • Minimize expensive access (e.g., disk access) • B-tree: Dynamic sets that is optimized for disks
  • 3. AB-treeis an M-way search tree with two properties : 1. It is perfectly balanced: every leaf node is at the same depth 2. Every internal node other than the root, is at least half- full, i.e. M/2-1 ≤ #keys ≤ M-1 3. Every internal node with k keys has k+1 non-null children For simplicity we consider Meven and we use t=M/2: 2.* Every internal node other than the root is at least half- full, i.e.t-1≤ #keys ≤2t-1, t≤ #children ≤2t B-Trees
  • 4. Example: a 4-way B-tree B-tree 4-way tree B-tree 1. It is perfectly balanced: every leaf node is at the same depth. 2. Every node, except maybe the root, is at least half-full t-1≤ #keys ≤2t-1 3. Every internal node with k keys has k+1 non-null children 20 40 0 5 10 25 35 45 55 20 40 0 5 25 35 45 55 10
  • 5. B-treeHeight Claim: any B-tree with nkeys, height hand minimum degree t satisfies: Proof: • The minimum number of KEYS for a tree with height h is obtainedwhen: – The root contains one key – All other nodes containt-1 keys 2 1 log   n h t
  • 6. B-Tree: Insert X 1. As in M-waytree find the leaf node to which Xshould be added 2. Add X to this node in the appropriate place among the values already there (there are no subtrees to worry about) 3. Number of values in the node after adding the key: – Fewer than 2t-1: done – Equal to 2t: overflowed 4. Fix overflowed node
  • 7. Fix an Overflowed 1. Split the node into three parts, M=2t: – Left: the first t values, become a left child node – Middle: the middle value at position t, goes up to parent – Right: the last t-1 values, become a right child node 2. Continue with the parent: 1. Until no overflow occurs in the parent 2. If the root overflows, split it too, and create a new root node y … 56 98 …. 60 65 68 83 86 90 … 56 68 98 …. 60 65 83 86 90 split J x x y z
  • 8. Insert example 20 40 60 80 0 5 10 15 25 35 45 55 87 98 Insert 3: 20 40 60 80 0 3 5 1015 25 35 45 55 3;6  tM 62 66 70 74 78 62 66 70 74 78 87 98
  • 9. 61 62 66 7074 78 20 4060 80 0 3 5 10 15 25 35 45 55 Insert 61: 3;6  tM 62 66 70 74 78 87 98 20 40 60 80 0 3 5 10 15 25 35 45 55 87 98 74 7861 62 66 OVERFLOW 20 40 60 70 80 0 3 5 10 15 25 35 45 55 87 98 SPLIT IT
  • 10. Insert 38: 74 7861 62 66 20 40 60 70 80 0 3 5 1015 25 35 45 55 87 98 74 7861 62 66 20 40 60 70 80 0 3 510 15 25 35 38 45 55 87 98 3;6  tM
  • 11. 5 20 4060 7080 Insert 4: 0 3 4 2535 38 45 55 6162 66 87 9874 7810 15 74 786162 66 20 40 60 70 80 0 3 4 510 15 25 35 38 45 55 87 98 74 7861 6266 20 40 60 70 80 25 35 38 45 55 87 98 OVERFLOW 0 3 5 10 15 SPLIT IT OVERFLOW SPLIT IT 3;6  tM
  • 12. 0 3 4 25 35 38 45 55 61 62 66 87 9874 78 60 5 20 40 70 80 10 15 5 20 40 60 70 80 0 3 4 25 35 38 45 55 61 62 66 87 9874 7810 15 OVERFLOW SPLIT IT 3;6  tM
  • 13. Complexity Insert • Inserting a key into a B-tree of height h is done in a single pass down the tree and a single pass up the tree Complexity: )(log)( nOhO t
  • 14. B Vs B+ Tree
  • 15. B trees • Generalization of binary search trees – Not binary trees – The B stands for Bayer (or Boeing) • Designed for searching data stored on block- oriented devices
  • 16. A very small B tree Bottom nodes are leaf nodes: all their pointers are NULL
  • 17. In reality In tree ptr Key Data ptr In tree ptr Key Data ptr In tree ptr Key Data ptr In tree ptr Key Data ptr In tree ptr To Leaf 7 To leaf 16 To Leaf -- Null Null -- Null Null
  • 18. B+ trees • Variant of B trees • Two types of nodes – Internal nodes have no data pointers – Leaf nodes have no in-tree pointers • Were all null!
  • 20. B+ trees • Variant of B trees • Two types of nodes – Internal nodes have no data pointers – Leaf nodes have no in-tree pointers • Were all null!
  • 22. Example B+-tree 9 5 1 3 5 6 30 409 16 17 16 30  index node  leaf/data node