SlideShare ist ein Scribd-Unternehmen logo
1 von 34
B-Trees And B+-TreesB-Trees And B+-Trees
Jay YimJay Yim
CS 157BCS 157B
Dr. LeeDr. Lee
PreviewPreview
• B-Tree IndexingB-Tree Indexing
• B-TreeB-Tree
• B-Tree CharacteristicsB-Tree Characteristics
• B-Tree ExampleB-Tree Example
• B+-TreeB+-Tree
• B+-Tree CharacteristicsB+-Tree Characteristics
• B+-Tree ExampleB+-Tree Example
B-Tree IndexB-Tree Index
• Standard use index in relational databases in a B-TreeStandard use index in relational databases in a B-Tree
index.index.
• Allows for rapid tree traversal searching through anAllows for rapid tree traversal searching through an
upside-down tree structureupside-down tree structure
• Reading a single record from a very large table using aReading a single record from a very large table using a
B-Tree index, can often result in a few block reads—B-Tree index, can often result in a few block reads—
even when the index and table are millions of blocks ineven when the index and table are millions of blocks in
size.size.
• Any index structure other than a B-Tree index is subjectAny index structure other than a B-Tree index is subject
to overflow.to overflow.
– Overflow is where any changes made to tables will not haveOverflow is where any changes made to tables will not have
records added into the original index structure, but rather tackedrecords added into the original index structure, but rather tacked
on the end.on the end.
What is a B-Tree?What is a B-Tree?
• B-tree is a specialized multiway treeB-tree is a specialized multiway tree
designed especially for use on disk.designed especially for use on disk.
• B-Tree consists of a root node, branchB-Tree consists of a root node, branch
nodes and leaf nodes containing thenodes and leaf nodes containing the
indexed field values in the ending (or leaf)indexed field values in the ending (or leaf)
nodes of the tree.nodes of the tree.
B-Tree CharacteristicsB-Tree Characteristics
• In a B-tree each node may contain a large number ofIn a B-tree each node may contain a large number of
keyskeys
• B-tree is designed to branch out in a large number ofB-tree is designed to branch out in a large number of
directions and to contain a lot of keys in each node sodirections and to contain a lot of keys in each node so
that the height of the tree is relatively smallthat the height of the tree is relatively small
• Constraints that tree is always balancedConstraints that tree is always balanced
• Space wasted by deletion, if any, never becomesSpace wasted by deletion, if any, never becomes
excessiveexcessive
• Insert and deletions are simple processesInsert and deletions are simple processes
– Complicated only under special circumstancesComplicated only under special circumstances
-Insertion into a node that is already full or a deletion from a-Insertion into a node that is already full or a deletion from a
node makes it less then half fullnode makes it less then half full
Characteristics of a B-Tree of OrderCharacteristics of a B-Tree of Order
PP
• Within each node, KWithin each node, K11 < K< K22 < .. < K< .. < Kp-1p-1
• Each node has at most p tree pointerEach node has at most p tree pointer
• Each node, except the root and leaf nodes, hasEach node, except the root and leaf nodes, has
at least ceil(p/2) tree pointers, The root node hasat least ceil(p/2) tree pointers, The root node has
at least two tree pointers unless it is the onlyat least two tree pointers unless it is the only
node in the tree.node in the tree.
• All leaf nodes are at the same level. Leaf nodeAll leaf nodes are at the same level. Leaf node
have the same structure as internal nodeshave the same structure as internal nodes
except that all of their tree pointer Pexcept that all of their tree pointer Pii are null.are null.
B-Tree InsertionB-Tree Insertion
1)1) B-tree starts with a single root node (which is also a leaf node) atB-tree starts with a single root node (which is also a leaf node) at
level 0.level 0.
2)2) Once the root node is full with p – 1 search key values and whenOnce the root node is full with p – 1 search key values and when
attempt to insert another entry in the tree, the root node splits intoattempt to insert another entry in the tree, the root node splits into
two nodes at level 1.two nodes at level 1.
3)3) Only the middle value is kept in the root node, and the rest of theOnly the middle value is kept in the root node, and the rest of the
values are split evenly between the other two nodes.values are split evenly between the other two nodes.
4)4) When a nonroot node is full and a new entry is inserted into it,When a nonroot node is full and a new entry is inserted into it,
that node is split into two nodes at the same level, and the middlethat node is split into two nodes at the same level, and the middle
entry is moved to the parent node along with two pointers to theentry is moved to the parent node along with two pointers to the
new split nodes.new split nodes.
5)5) If the parent node is full, it is also split.If the parent node is full, it is also split.
6)6) Splitting can propagate all the way to the root node, creating aSplitting can propagate all the way to the root node, creating a
new level if the root is split.new level if the root is split.
B-Tree DeletionB-Tree Deletion
1)1) If deletion of a value causes a node to be lessIf deletion of a value causes a node to be less
than half full, it is combined with it neighboringthan half full, it is combined with it neighboring
nodes, and this can also propagate all the waynodes, and this can also propagate all the way
to the root.to the root.
- Can reduce the number of tree levels.- Can reduce the number of tree levels.
*Shown by analysis and simulation that, after numerous random insertions and*Shown by analysis and simulation that, after numerous random insertions and
deletions on a B-tree, the nodes are approximately 69 percent full whendeletions on a B-tree, the nodes are approximately 69 percent full when
the number of values in the tree stabilizes. If this happens , node splittingthe number of values in the tree stabilizes. If this happens , node splitting
and combining will occur only rarely, so insertion and deletion becomeand combining will occur only rarely, so insertion and deletion become
quite efficient.quite efficient.
B-tree of Order 5 ExampleB-tree of Order 5 Example
• All internal nodes have at least ceil(5 / 2) = ceil(2.5) = 3 childrenAll internal nodes have at least ceil(5 / 2) = ceil(2.5) = 3 children
(and hence at least 2 keys), other then the root node.(and hence at least 2 keys), other then the root node.
• The maximum number of children that a node can have is 5 (soThe maximum number of children that a node can have is 5 (so
that 4 is the maximum number of keys)that 4 is the maximum number of keys)
• each leaf node must contain at least 2 keyseach leaf node must contain at least 2 keys
B-Tree Order 5 InsertionB-Tree Order 5 Insertion
• Originally we have an empty B-tree of order 5Originally we have an empty B-tree of order 5
• Want to insert C N G A H E K Q M F W L T Z D P R X YWant to insert C N G A H E K Q M F W L T Z D P R X Y
SS
• Order 5 means that a node can have a maximum of 5Order 5 means that a node can have a maximum of 5
children and 4 keyschildren and 4 keys
• All nodes other than the root must have a minimum of 2All nodes other than the root must have a minimum of 2
keyskeys
• The first 4 letters get inserted into the same nodeThe first 4 letters get inserted into the same node
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• When we try to insert the H, we find no room in thisWhen we try to insert the H, we find no room in this
node, so we split it into 2 nodes, moving the mediannode, so we split it into 2 nodes, moving the median
item G up into a new root node.item G up into a new root node.
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• Inserting E, K, and Q proceeds withoutInserting E, K, and Q proceeds without
requiring any splitsrequiring any splits
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• Inserting M requires a splitInserting M requires a split
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• The letters F, W, L, and T are then addedThe letters F, W, L, and T are then added
without needing any splitwithout needing any split
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• When Z is added, the rightmost leaf must be split. TheWhen Z is added, the rightmost leaf must be split. The
median item T is moved up into the parent nodemedian item T is moved up into the parent node
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• The insertion of D causes the leftmost leaf to be split. D happensThe insertion of D causes the leftmost leaf to be split. D happens
to be the median key and so is the one moved up into the parentto be the median key and so is the one moved up into the parent
node.node.
• The letters P, R, X, and Y are then added without any need ofThe letters P, R, X, and Y are then added without any need of
splittingsplitting
B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont.
• Finally, when S is added, the node with N, P, Q, and R splits,Finally, when S is added, the node with N, P, Q, and R splits,
sending the median Q up to the parent.sending the median Q up to the parent.
• The parent node is full, so it splits, sending the median M up toThe parent node is full, so it splits, sending the median M up to
form a new root node.form a new root node.
B-Tree Order 5 DeletionB-Tree Order 5 Deletion
• Initial B-TreeInitial B-Tree
B-Tree Order 5 Deletion Cont.B-Tree Order 5 Deletion Cont.
• Delete HDelete H
• Since H is in a leaf and the leaf has more than theSince H is in a leaf and the leaf has more than the
minimum number of keys, we just remove it.minimum number of keys, we just remove it.
B-Tree Order 5 Deletion Cont.B-Tree Order 5 Deletion Cont.
• Delete T.Delete T.
• Since T is not in a leaf, we find its successor (the next item in ascendingSince T is not in a leaf, we find its successor (the next item in ascending
order), which happens to be W.order), which happens to be W.
• Move W up to replace the T. That way, what we really have to do is toMove W up to replace the T. That way, what we really have to do is to
delete W from the leaf .delete W from the leaf .
B+- Tree CharacteristicsB+- Tree Characteristics
• Data records are only stored in the leaves.Data records are only stored in the leaves.
• Internal nodes store just keys.Internal nodes store just keys.
• Keys are used for directing a search to theKeys are used for directing a search to the
proper leaf.proper leaf.
• If a target key is less than a key in an internalIf a target key is less than a key in an internal
node, then the pointer just to its left is followed.node, then the pointer just to its left is followed.
• If a target key is greater or equal to the key inIf a target key is greater or equal to the key in
the internal node, then the pointer to its right isthe internal node, then the pointer to its right is
followed.followed.
• B+ Tree combines features of ISAM (IndexedB+ Tree combines features of ISAM (Indexed
Sequential Access Method) and B Trees.Sequential Access Method) and B Trees.
B+- Tree Characteristics Cont.B+- Tree Characteristics Cont.
• Implemented on disk, it is likely that theImplemented on disk, it is likely that the
leaves contain key, pointer pairs whereleaves contain key, pointer pairs where
the pointer field points to the record ofthe pointer field points to the record of
data associated with the key.data associated with the key.
– allows the data file to exist separately fromallows the data file to exist separately from
the B+ tree, which functions as an "index"the B+ tree, which functions as an "index"
giving an ordering to the data in the data file.giving an ordering to the data in the data file.
B+- Tree Characteristics Cont.B+- Tree Characteristics Cont.
• Very Fast SearchingVery Fast Searching
• Insertion and deletion are expensive.Insertion and deletion are expensive.
Formula n-order B+ tree with a height of hFormula n-order B+ tree with a height of h
• Maximum number of keys is nMaximum number of keys is nhh
• Minimum number of keys is 2(n / 2)Minimum number of keys is 2(n / 2)h − 1h − 1
B+ tree of order 200 ExampleB+ tree of order 200 Example
• Leaves can each contain up to 199 keysLeaves can each contain up to 199 keys
• Assuming that the root node has at least 100Assuming that the root node has at least 100
childrenchildren
• A 2 level B+ tree that meets these assumptionsA 2 level B+ tree that meets these assumptions
can store about 9,900 records, since there are atcan store about 9,900 records, since there are at
least 100 leaves, each containing at least 99least 100 leaves, each containing at least 99
keys.keys.
• A 3 level B+ tree of this type can store about 1A 3 level B+ tree of this type can store about 1
million keys. A 4 level B+ tree can store up tomillion keys. A 4 level B+ tree can store up to
about 100 million keys.about 100 million keys.
B+- Tree StructureB+- Tree Structure
B+- Tree order 3 InsertionB+- Tree order 3 Insertion
• Insert value 5, 8, 1, 7Insert value 5, 8, 1, 7
• Inserting value 5Inserting value 5
• Since the node is empty, the value must beSince the node is empty, the value must be
placed in the leaf node.placed in the leaf node.
B+- Tree Insertion Cont.B+- Tree Insertion Cont.
• Inserting value 8Inserting value 8
• Since the node has room, we insert the newSince the node has room, we insert the new
value.value.
B+- Tree Insertion Cont.B+- Tree Insertion Cont.
• Insert value 1Insert value 1
• Since the node is full, it must be split into two nodes.Since the node is full, it must be split into two nodes.
• Each node is half full.Each node is half full.
B+- Tree Insertion Cont.B+- Tree Insertion Cont.
• Inserting value 7.Inserting value 7.
B+- Tree DeletionB+- Tree Deletion
• Initial TreeInitial Tree
B+- Tree Deletion Cont.B+- Tree Deletion Cont.
• Delete Value 9Delete Value 9
• Since the node is not less than half full, theSince the node is not less than half full, the
tree is correct.tree is correct.
B+- Tree Deletion Cont.B+- Tree Deletion Cont.
• Deleting value 8Deleting value 8
• The node is less then half full, the values areThe node is less then half full, the values are
redistributed from the node on the left because it is full.redistributed from the node on the left because it is full.
• The parent node is adjusted to reflect the change.The parent node is adjusted to reflect the change.
ReferencesReferences
• Beginning Database Design By Gavin PowellBeginning Database Design By Gavin Powell
• Database System Concepts By Silberschatz,Database System Concepts By Silberschatz,
Korth, SudarshanKorth, Sudarshan
• Fundamentals of Database Systems By Elmasri,Fundamentals of Database Systems By Elmasri,
NavatheNavathe
• http://http://dns.mec.ac.in/notes/ds/bpdns.mec.ac.in/notes/ds/bp lus.htmlus.htm
• http://cis.stvincent.edu/swd/btree/btree.hthttp://cis.stvincent.edu/swd/btree/btree.ht
mlml

Weitere ähnliche Inhalte

Was ist angesagt?

B+tree Data structures presentation
B+tree Data structures presentationB+tree Data structures presentation
B+tree Data structures presentationMuhammad Bilal Khan
 
B+ tree intro,uses,insertion and deletion
B+ tree intro,uses,insertion and deletionB+ tree intro,uses,insertion and deletion
B+ tree intro,uses,insertion and deletionHAMID-50
 
B Trees
B TreesB Trees
B TreesAisu
 
Lecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsLecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsAakash deep Singhal
 
Tree Data Structure by Daniyal Khan
Tree Data Structure by Daniyal KhanTree Data Structure by Daniyal Khan
Tree Data Structure by Daniyal KhanDaniyal Khan
 
Data structure tree - beginner
Data structure tree - beginnerData structure tree - beginner
Data structure tree - beginnerMD. MARUFUZZAMAN .
 
introduction to_trees
introduction to_treesintroduction to_trees
introduction to_treesDanish Aakash
 
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
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures treemaamir farooq
 
358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10sumitbardhan
 
Data structure tree - intermediate
Data structure tree - intermediateData structure tree - intermediate
Data structure tree - intermediateMD. MARUFUZZAMAN .
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search TreeShivam Singh
 

Was ist angesagt? (20)

B tree
B treeB tree
B tree
 
B+tree Data structures presentation
B+tree Data structures presentationB+tree Data structures presentation
B+tree Data structures presentation
 
B+ tree intro,uses,insertion and deletion
B+ tree intro,uses,insertion and deletionB+ tree intro,uses,insertion and deletion
B+ tree intro,uses,insertion and deletion
 
B Trees
B TreesB Trees
B Trees
 
B+ Tree
B+ TreeB+ Tree
B+ Tree
 
B+ tree
B+ treeB+ tree
B+ tree
 
B+ Tree
B+ TreeB+ Tree
B+ Tree
 
B+ trees and height balance tree
B+ trees and height balance treeB+ trees and height balance tree
B+ trees and height balance tree
 
Data structure tree- advance
Data structure tree- advanceData structure tree- advance
Data structure tree- advance
 
Binary search trees
Binary search treesBinary search trees
Binary search trees
 
Lecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsLecture 8 data structures and algorithms
Lecture 8 data structures and algorithms
 
Tree Data Structure by Daniyal Khan
Tree Data Structure by Daniyal KhanTree Data Structure by Daniyal Khan
Tree Data Structure by Daniyal Khan
 
Data structure tree - beginner
Data structure tree - beginnerData structure tree - beginner
Data structure tree - beginner
 
introduction to_trees
introduction to_treesintroduction to_trees
introduction to_trees
 
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
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures tree
 
358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10
 
Data structure tree - intermediate
Data structure tree - intermediateData structure tree - intermediate
Data structure tree - intermediate
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 

Andere mochten auch

Andere mochten auch (20)

B tree
B treeB tree
B tree
 
Algorithm Introduction #18 B-Tree
Algorithm Introduction #18 B-TreeAlgorithm Introduction #18 B-Tree
Algorithm Introduction #18 B-Tree
 
BTree, Data Structures
BTree, Data StructuresBTree, Data Structures
BTree, Data Structures
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
B tree by-jash acharya
B tree by-jash acharyaB tree by-jash acharya
B tree by-jash acharya
 
B tree &amp;
B tree &amp;B tree &amp;
B tree &amp;
 
stack and queue array implementation in java.
stack and queue array implementation in java.stack and queue array implementation in java.
stack and queue array implementation in java.
 
Hash tables
Hash tablesHash tables
Hash tables
 
B tree long
B tree longB tree long
B tree long
 
TRIES_data_structure
TRIES_data_structureTRIES_data_structure
TRIES_data_structure
 
Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)
 
Application of tries
Application of triesApplication of tries
Application of tries
 
stack & queue
stack & queuestack & queue
stack & queue
 
08 Hash Tables
08 Hash Tables08 Hash Tables
08 Hash Tables
 
Avl tree
Avl treeAvl tree
Avl tree
 
Data Structure -List Stack Queue
Data Structure -List Stack QueueData Structure -List Stack Queue
Data Structure -List Stack Queue
 
B Trees
B TreesB Trees
B Trees
 
Splay Tree
Splay TreeSplay Tree
Splay Tree
 
1.8 splay tree
1.8 splay tree 1.8 splay tree
1.8 splay tree
 
Trie Data Structure
Trie Data StructureTrie Data Structure
Trie Data Structure
 

Ähnlich wie B trees and_b__trees

B-and-B-Tree-ppt presentation in data structure
B-and-B-Tree-ppt presentation in data structureB-and-B-Tree-ppt presentation in data structure
B-and-B-Tree-ppt presentation in data structuressuser19bb13
 
109885098-B-Trees-And-B-Trees in data structure.ppt
109885098-B-Trees-And-B-Trees in data structure.ppt109885098-B-Trees-And-B-Trees in data structure.ppt
109885098-B-Trees-And-B-Trees in data structure.pptssuser19bb13
 
chapter 6.1.pptx
chapter 6.1.pptxchapter 6.1.pptx
chapter 6.1.pptxTekle12
 
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
 
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
 
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
 
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
 
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
 
Multiway Trees.ppt
Multiway Trees.pptMultiway Trees.ppt
Multiway Trees.pptAseemBhube1
 
tree-160731205832.pptx
tree-160731205832.pptxtree-160731205832.pptx
tree-160731205832.pptxMouDhara1
 
Binary search tree
Binary search treeBinary search tree
Binary search treeSana Yameen
 

Ähnlich wie B trees and_b__trees (20)

B-and-B-Tree-ppt presentation in data structure
B-and-B-Tree-ppt presentation in data structureB-and-B-Tree-ppt presentation in data structure
B-and-B-Tree-ppt presentation in data structure
 
109885098-B-Trees-And-B-Trees in data structure.ppt
109885098-B-Trees-And-B-Trees in data structure.ppt109885098-B-Trees-And-B-Trees in data structure.ppt
109885098-B-Trees-And-B-Trees in data structure.ppt
 
chapter 6.1.pptx
chapter 6.1.pptxchapter 6.1.pptx
chapter 6.1.pptx
 
B+ tree.pptx
B+ tree.pptxB+ tree.pptx
B+ tree.pptx
 
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
 
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
 
Unit 3 trees
Unit 3   treesUnit 3   trees
Unit 3 trees
 
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 ( 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
 
Tree
TreeTree
Tree
 
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
 
DSA-Unit-2.pptx
DSA-Unit-2.pptxDSA-Unit-2.pptx
DSA-Unit-2.pptx
 
Tree
TreeTree
Tree
 
Multiway Trees.ppt
Multiway Trees.pptMultiway Trees.ppt
Multiway Trees.ppt
 
tree-160731205832.pptx
tree-160731205832.pptxtree-160731205832.pptx
tree-160731205832.pptx
 
Module - 5_Trees.pdf
Module - 5_Trees.pdfModule - 5_Trees.pdf
Module - 5_Trees.pdf
 
Data Structures 4
Data Structures 4Data Structures 4
Data Structures 4
 
Binary search tree
Binary search treeBinary search tree
Binary search tree
 
Unit 6 tree
Unit   6 treeUnit   6 tree
Unit 6 tree
 
Binary tree
Binary treeBinary tree
Binary tree
 

Kürzlich hochgeladen

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

B trees and_b__trees

  • 1. B-Trees And B+-TreesB-Trees And B+-Trees Jay YimJay Yim CS 157BCS 157B Dr. LeeDr. Lee
  • 2. PreviewPreview • B-Tree IndexingB-Tree Indexing • B-TreeB-Tree • B-Tree CharacteristicsB-Tree Characteristics • B-Tree ExampleB-Tree Example • B+-TreeB+-Tree • B+-Tree CharacteristicsB+-Tree Characteristics • B+-Tree ExampleB+-Tree Example
  • 3. B-Tree IndexB-Tree Index • Standard use index in relational databases in a B-TreeStandard use index in relational databases in a B-Tree index.index. • Allows for rapid tree traversal searching through anAllows for rapid tree traversal searching through an upside-down tree structureupside-down tree structure • Reading a single record from a very large table using aReading a single record from a very large table using a B-Tree index, can often result in a few block reads—B-Tree index, can often result in a few block reads— even when the index and table are millions of blocks ineven when the index and table are millions of blocks in size.size. • Any index structure other than a B-Tree index is subjectAny index structure other than a B-Tree index is subject to overflow.to overflow. – Overflow is where any changes made to tables will not haveOverflow is where any changes made to tables will not have records added into the original index structure, but rather tackedrecords added into the original index structure, but rather tacked on the end.on the end.
  • 4. What is a B-Tree?What is a B-Tree? • B-tree is a specialized multiway treeB-tree is a specialized multiway tree designed especially for use on disk.designed especially for use on disk. • B-Tree consists of a root node, branchB-Tree consists of a root node, branch nodes and leaf nodes containing thenodes and leaf nodes containing the indexed field values in the ending (or leaf)indexed field values in the ending (or leaf) nodes of the tree.nodes of the tree.
  • 5. B-Tree CharacteristicsB-Tree Characteristics • In a B-tree each node may contain a large number ofIn a B-tree each node may contain a large number of keyskeys • B-tree is designed to branch out in a large number ofB-tree is designed to branch out in a large number of directions and to contain a lot of keys in each node sodirections and to contain a lot of keys in each node so that the height of the tree is relatively smallthat the height of the tree is relatively small • Constraints that tree is always balancedConstraints that tree is always balanced • Space wasted by deletion, if any, never becomesSpace wasted by deletion, if any, never becomes excessiveexcessive • Insert and deletions are simple processesInsert and deletions are simple processes – Complicated only under special circumstancesComplicated only under special circumstances -Insertion into a node that is already full or a deletion from a-Insertion into a node that is already full or a deletion from a node makes it less then half fullnode makes it less then half full
  • 6. Characteristics of a B-Tree of OrderCharacteristics of a B-Tree of Order PP • Within each node, KWithin each node, K11 < K< K22 < .. < K< .. < Kp-1p-1 • Each node has at most p tree pointerEach node has at most p tree pointer • Each node, except the root and leaf nodes, hasEach node, except the root and leaf nodes, has at least ceil(p/2) tree pointers, The root node hasat least ceil(p/2) tree pointers, The root node has at least two tree pointers unless it is the onlyat least two tree pointers unless it is the only node in the tree.node in the tree. • All leaf nodes are at the same level. Leaf nodeAll leaf nodes are at the same level. Leaf node have the same structure as internal nodeshave the same structure as internal nodes except that all of their tree pointer Pexcept that all of their tree pointer Pii are null.are null.
  • 7. B-Tree InsertionB-Tree Insertion 1)1) B-tree starts with a single root node (which is also a leaf node) atB-tree starts with a single root node (which is also a leaf node) at level 0.level 0. 2)2) Once the root node is full with p – 1 search key values and whenOnce the root node is full with p – 1 search key values and when attempt to insert another entry in the tree, the root node splits intoattempt to insert another entry in the tree, the root node splits into two nodes at level 1.two nodes at level 1. 3)3) Only the middle value is kept in the root node, and the rest of theOnly the middle value is kept in the root node, and the rest of the values are split evenly between the other two nodes.values are split evenly between the other two nodes. 4)4) When a nonroot node is full and a new entry is inserted into it,When a nonroot node is full and a new entry is inserted into it, that node is split into two nodes at the same level, and the middlethat node is split into two nodes at the same level, and the middle entry is moved to the parent node along with two pointers to theentry is moved to the parent node along with two pointers to the new split nodes.new split nodes. 5)5) If the parent node is full, it is also split.If the parent node is full, it is also split. 6)6) Splitting can propagate all the way to the root node, creating aSplitting can propagate all the way to the root node, creating a new level if the root is split.new level if the root is split.
  • 8. B-Tree DeletionB-Tree Deletion 1)1) If deletion of a value causes a node to be lessIf deletion of a value causes a node to be less than half full, it is combined with it neighboringthan half full, it is combined with it neighboring nodes, and this can also propagate all the waynodes, and this can also propagate all the way to the root.to the root. - Can reduce the number of tree levels.- Can reduce the number of tree levels. *Shown by analysis and simulation that, after numerous random insertions and*Shown by analysis and simulation that, after numerous random insertions and deletions on a B-tree, the nodes are approximately 69 percent full whendeletions on a B-tree, the nodes are approximately 69 percent full when the number of values in the tree stabilizes. If this happens , node splittingthe number of values in the tree stabilizes. If this happens , node splitting and combining will occur only rarely, so insertion and deletion becomeand combining will occur only rarely, so insertion and deletion become quite efficient.quite efficient.
  • 9. B-tree of Order 5 ExampleB-tree of Order 5 Example • All internal nodes have at least ceil(5 / 2) = ceil(2.5) = 3 childrenAll internal nodes have at least ceil(5 / 2) = ceil(2.5) = 3 children (and hence at least 2 keys), other then the root node.(and hence at least 2 keys), other then the root node. • The maximum number of children that a node can have is 5 (soThe maximum number of children that a node can have is 5 (so that 4 is the maximum number of keys)that 4 is the maximum number of keys) • each leaf node must contain at least 2 keyseach leaf node must contain at least 2 keys
  • 10. B-Tree Order 5 InsertionB-Tree Order 5 Insertion • Originally we have an empty B-tree of order 5Originally we have an empty B-tree of order 5 • Want to insert C N G A H E K Q M F W L T Z D P R X YWant to insert C N G A H E K Q M F W L T Z D P R X Y SS • Order 5 means that a node can have a maximum of 5Order 5 means that a node can have a maximum of 5 children and 4 keyschildren and 4 keys • All nodes other than the root must have a minimum of 2All nodes other than the root must have a minimum of 2 keyskeys • The first 4 letters get inserted into the same nodeThe first 4 letters get inserted into the same node
  • 11. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • When we try to insert the H, we find no room in thisWhen we try to insert the H, we find no room in this node, so we split it into 2 nodes, moving the mediannode, so we split it into 2 nodes, moving the median item G up into a new root node.item G up into a new root node.
  • 12. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • Inserting E, K, and Q proceeds withoutInserting E, K, and Q proceeds without requiring any splitsrequiring any splits
  • 13. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • Inserting M requires a splitInserting M requires a split
  • 14. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • The letters F, W, L, and T are then addedThe letters F, W, L, and T are then added without needing any splitwithout needing any split
  • 15. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • When Z is added, the rightmost leaf must be split. TheWhen Z is added, the rightmost leaf must be split. The median item T is moved up into the parent nodemedian item T is moved up into the parent node
  • 16. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • The insertion of D causes the leftmost leaf to be split. D happensThe insertion of D causes the leftmost leaf to be split. D happens to be the median key and so is the one moved up into the parentto be the median key and so is the one moved up into the parent node.node. • The letters P, R, X, and Y are then added without any need ofThe letters P, R, X, and Y are then added without any need of splittingsplitting
  • 17. B-Tree Order 5 Insertion Cont.B-Tree Order 5 Insertion Cont. • Finally, when S is added, the node with N, P, Q, and R splits,Finally, when S is added, the node with N, P, Q, and R splits, sending the median Q up to the parent.sending the median Q up to the parent. • The parent node is full, so it splits, sending the median M up toThe parent node is full, so it splits, sending the median M up to form a new root node.form a new root node.
  • 18. B-Tree Order 5 DeletionB-Tree Order 5 Deletion • Initial B-TreeInitial B-Tree
  • 19. B-Tree Order 5 Deletion Cont.B-Tree Order 5 Deletion Cont. • Delete HDelete H • Since H is in a leaf and the leaf has more than theSince H is in a leaf and the leaf has more than the minimum number of keys, we just remove it.minimum number of keys, we just remove it.
  • 20. B-Tree Order 5 Deletion Cont.B-Tree Order 5 Deletion Cont. • Delete T.Delete T. • Since T is not in a leaf, we find its successor (the next item in ascendingSince T is not in a leaf, we find its successor (the next item in ascending order), which happens to be W.order), which happens to be W. • Move W up to replace the T. That way, what we really have to do is toMove W up to replace the T. That way, what we really have to do is to delete W from the leaf .delete W from the leaf .
  • 21. B+- Tree CharacteristicsB+- Tree Characteristics • Data records are only stored in the leaves.Data records are only stored in the leaves. • Internal nodes store just keys.Internal nodes store just keys. • Keys are used for directing a search to theKeys are used for directing a search to the proper leaf.proper leaf. • If a target key is less than a key in an internalIf a target key is less than a key in an internal node, then the pointer just to its left is followed.node, then the pointer just to its left is followed. • If a target key is greater or equal to the key inIf a target key is greater or equal to the key in the internal node, then the pointer to its right isthe internal node, then the pointer to its right is followed.followed. • B+ Tree combines features of ISAM (IndexedB+ Tree combines features of ISAM (Indexed Sequential Access Method) and B Trees.Sequential Access Method) and B Trees.
  • 22. B+- Tree Characteristics Cont.B+- Tree Characteristics Cont. • Implemented on disk, it is likely that theImplemented on disk, it is likely that the leaves contain key, pointer pairs whereleaves contain key, pointer pairs where the pointer field points to the record ofthe pointer field points to the record of data associated with the key.data associated with the key. – allows the data file to exist separately fromallows the data file to exist separately from the B+ tree, which functions as an "index"the B+ tree, which functions as an "index" giving an ordering to the data in the data file.giving an ordering to the data in the data file.
  • 23. B+- Tree Characteristics Cont.B+- Tree Characteristics Cont. • Very Fast SearchingVery Fast Searching • Insertion and deletion are expensive.Insertion and deletion are expensive.
  • 24. Formula n-order B+ tree with a height of hFormula n-order B+ tree with a height of h • Maximum number of keys is nMaximum number of keys is nhh • Minimum number of keys is 2(n / 2)Minimum number of keys is 2(n / 2)h − 1h − 1
  • 25. B+ tree of order 200 ExampleB+ tree of order 200 Example • Leaves can each contain up to 199 keysLeaves can each contain up to 199 keys • Assuming that the root node has at least 100Assuming that the root node has at least 100 childrenchildren • A 2 level B+ tree that meets these assumptionsA 2 level B+ tree that meets these assumptions can store about 9,900 records, since there are atcan store about 9,900 records, since there are at least 100 leaves, each containing at least 99least 100 leaves, each containing at least 99 keys.keys. • A 3 level B+ tree of this type can store about 1A 3 level B+ tree of this type can store about 1 million keys. A 4 level B+ tree can store up tomillion keys. A 4 level B+ tree can store up to about 100 million keys.about 100 million keys.
  • 26. B+- Tree StructureB+- Tree Structure
  • 27. B+- Tree order 3 InsertionB+- Tree order 3 Insertion • Insert value 5, 8, 1, 7Insert value 5, 8, 1, 7 • Inserting value 5Inserting value 5 • Since the node is empty, the value must beSince the node is empty, the value must be placed in the leaf node.placed in the leaf node.
  • 28. B+- Tree Insertion Cont.B+- Tree Insertion Cont. • Inserting value 8Inserting value 8 • Since the node has room, we insert the newSince the node has room, we insert the new value.value.
  • 29. B+- Tree Insertion Cont.B+- Tree Insertion Cont. • Insert value 1Insert value 1 • Since the node is full, it must be split into two nodes.Since the node is full, it must be split into two nodes. • Each node is half full.Each node is half full.
  • 30. B+- Tree Insertion Cont.B+- Tree Insertion Cont. • Inserting value 7.Inserting value 7.
  • 31. B+- Tree DeletionB+- Tree Deletion • Initial TreeInitial Tree
  • 32. B+- Tree Deletion Cont.B+- Tree Deletion Cont. • Delete Value 9Delete Value 9 • Since the node is not less than half full, theSince the node is not less than half full, the tree is correct.tree is correct.
  • 33. B+- Tree Deletion Cont.B+- Tree Deletion Cont. • Deleting value 8Deleting value 8 • The node is less then half full, the values areThe node is less then half full, the values are redistributed from the node on the left because it is full.redistributed from the node on the left because it is full. • The parent node is adjusted to reflect the change.The parent node is adjusted to reflect the change.
  • 34. ReferencesReferences • Beginning Database Design By Gavin PowellBeginning Database Design By Gavin Powell • Database System Concepts By Silberschatz,Database System Concepts By Silberschatz, Korth, SudarshanKorth, Sudarshan • Fundamentals of Database Systems By Elmasri,Fundamentals of Database Systems By Elmasri, NavatheNavathe • http://http://dns.mec.ac.in/notes/ds/bpdns.mec.ac.in/notes/ds/bp lus.htmlus.htm • http://cis.stvincent.edu/swd/btree/btree.hthttp://cis.stvincent.edu/swd/btree/btree.ht mlml