Documente Academic
Documente Profesional
Documente Cultură
(emphasis on B+ trees)
By Huy Nguyen
Cs157b
0900-1015 TR
Lee, Sin-Min
Storage
We have been studying database languages
and queries and have yet to study how data is
stored.
We will look at how data is accessed and the
different Index methods used.
Different types index methods have good and
bad qualities which I will try to address.
Indices
Indices is used to look up, input and delete
data in a ordered manner.
Speed and efficiency is a main goal in the
different types of Indexing.
Speed and efficiency includes access type,
access time, insertion time, deletion time,
and space overhead.
Definitions
Pointer- identifies the disk block and offset
in the disk block.
Index record- holds search key value and
pointers to the records with the value.
Clustering index- an index whose search
key also defines the sequential order of the
file.
22
12
15
20
22
24
27
28
29
30
35
45
49
30 35 41 45
32 37 43 46
34 38 44 48
39
49
51
53
54
55
75
60
55
57
58
59
67
60 67
62 72
64 74
65
66
87
91 100
75 87 91 100
77 88 94 110
80 90 97 112
83
99 114
85
120
Search in a B+ Tree
Search: Start at root; use key comparisons
to go to leaf.
After
After
After
B+ VS. B- Trees
B+ trees store redundant search key values
because index is smaller.
In a B+ tree, all pointers to data records exists at
the leaf-level nodes.
B-tree eliminates redundancy but require
additional pointers to do so.
In a B-tree, pointers to data records exist at all
levels of the tree.
References
http://www.cs.sjsu.edu/~lee/cs157b/cs157b
.html
http://www.cs.ualberta.ca/~drafiei/291/note
s/6-tree-indexes.pdf
A. Silberschatz, H.F. Korth, S. Sudershan:
Database System Concepts, 5th ed.,
McGraw-Hill, 2006