6. 6
10
20
30
40
50
60
70
80
90
100
10
30
50
70
90
110
130
150
170
190
210
230
Primary index
Also called clustering
index
•The search
key of a
primary
index is
usually but
not
necessarily
the primary
key.
same order Search key
school.edhole.com
8. 8
Sequential File
10
20
30
40
50
60
70
80
90
100
Dense Index
10
20
30
40
50
60
70
80
90
100
110
120
Dense Index:
contains index
records for every
search-key values.
school.edhole.com
9. 9
Sequential File
10
20
30
40
50
60
70
80
90
100
Sparse Index
10
30
50
70
90
110
130
150
170
190
210
230
Sparse Index:
contains index
records for only some
search-key values.
Applicable when
records are
sequentially
ordered on
search-key
school.edhole.com
17. 17
SSaammppllee nnoonn--lleeaaff
57
81
95
to keys to keys to keys to keys
< 57 57£ k<81 81£k<95 ³95
Key is moved (not copied) from lower level
non-leaf node to upper level non-leaf node
school.edhole.com
18. 18
SSaammppllee lleeaaff nnooddee::
FFrroomm nnoonn--lleeaaff nnooddee
ttoo nneexxtt lleeaaff
in sequence 57
81
95
To record
with key 57
To record
with key 81
To record
with key 85
Key is copied (not moved) from leaf
schonoold.ee dtoh noolne-.lecaof mnode
24. 24
(3) Number ooff ppooiinntteerrss//kkeeyyss ffoorr BB++ttrreeee
Max Max Min Min
ptrs keys ptrs®data keys
Non-leaf
(non-root) n n-1 én/2ù én/2ù- 1
(noLne-raofot) n n-1
Root n n-1 2 1
é(n-1)/2ù é(n-1)/2ù
school.edhole.com