Académique Documents
Professionnel Documents
Culture Documents
o Storage of data
– Primary Storage = Main Memory
File Organization and • Fast
Storage Structures • Volatile
• Expensive
File Organization and Storage Structures - 1 File Organization and Storage Structures - 2
File Organization and Storage Structures - 3 File Organization and Storage Structures - 4
File Organization and Storage Structures - 5 File Organization and Storage Structures - 6
File Organization and Storage Structures - 7 File Organization and Storage Structures - 8
o Rarely used unless come with an index => Indexed o Eg., use the division-remainder calculation method
Sequential File that,
File Organization and Storage Structures - 9 File Organization and Storage Structures - 10
Open Addressing
File Organization and Storage Structures - 13 File Organization and Storage Structures - 14
Multiple Hashing
Limitation (of Hashing)
o Upon collision, apply a second hashing function to
produce a new hash address in an overflow area.
Inappropriate for some retrievals:
– based on pattern matching
eg. Find all students with ID like 98xxxxxx.
File Organization and Storage Structures - 15 File Organization and Storage Structures - 16
File Organization and Storage Structures - 17 File Organization and Storage Structures - 18
File Organization and Storage Structures - 19 File Organization and Storage Structures - 20
TERMINOLOGY
B+-Trees B+-Trees
In practice, each node in the tree is actually a page, so we RULES (Cont’d):
can store many pointers and keys. Eg. For a page size
of 4KB, the B+-Tree can be of order 512. o For a tree or order n, the number of key values in a
leaf node must be between (n-1)/2 and (n-1) pointers
Access time depends more ofen upon depth than on and children. If (n-1)/2 is not an integer, the result is
breadth => Shallow trees are preferred. rounded up.
Example:
Adding Adding
SG14 SA9
File Organization and Storage Structures - 25 File Organization and Storage Structures - 26
B+-Trees Summary