LN344 1112 Index
LN344 1112 Index
Lecture 11–12
Physical Storage
Tree-based index structures
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
80
80
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
80
50 80
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
80
50 80 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
80
50 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
50 60 80
80
90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
60 80
50 60 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
60 80
50 60 65 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
65 70 80
60 80
50 60 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
60 70 80
50 60 65 70 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
60 70 80
50 60 65 70 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
50 55 60
60 70 80
65 70 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
55 60 70 80
50 55 60 65 70 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
64 65 70
55 60 70 80
50 55 60 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
65
55 60 70 80
50 55 60 64 65 70 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
65
55 60 70 80
50 55 60 64 65 70 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
65
55 60 70 80
50 55 60 64 65 70 75 80 90 100
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
B+-tree Example
80, 50, 100, 90, 60, 65, 70, 75, 55, 64, 51, 76, 77, 78, 200
65
51 55 60 70 80
50 51 55 60 64 65 70 75 80 90 100
65
51 55 60 70 76 80
50 51 55 60 64 65 70 75 76 80 90 100
65
51 55 60 70 76 80
50 51 55 60 64 65 70 75 76 77 80 90 100
65
51 55 60 70 76 78 80
50 51 55 60 64 65 70 75 76 77 78 80 90 100
65
100
51 55 60 70 76 78 80
50 51 55 60 64 65
70 75 76 77 78 80 90 100 200
65 78
51 55 60 70 76 80 100
70 75 76 77 78
50 51 55
60 64 65
80 90 100 200
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
Deletion from B-Tree
46
Scenario 1: Deletion from a leaf node that does not violate the
minimum capacity constraint
Just delete the record from its location in the node
Scenario 2: When deleting from a non-leaf node the comparison
key must be maintained (Delete the record with key 84)
Replace the record with its inorder successor (right then all left). In
our case it is the record with key 87.
73 84
87 91 92
BIL344 Database Systems (2012) | Mustafa Sert, Ph.D.
Deletion from B-Tree
48
73 87
91 92
85 200 350
53 70 90 100 105
85 200 350
53 90 100 105
90 200 350
53 85 100 105
85 200 350
53 70 90 100
85 200 350
53 90 100
200 350
53 85 90 100
200 350
53 85 90 100
5 5 137 Association:
2 3 8 14 16 22 27 29 33 34 38 27
39 30
< : Left
: Right
2 3 5 7 8 14 16 22 24 27 29 33 34 38 39