Indexing: By: Arnold Mesa
Indexing: By: Arnold Mesa
Indexing
You can think of an index to a file like a
catalogue to a library
values.
Hash Indices - a uniform distribution of
Key Concepts
Access Types - types of access that are supported
efficiently
Access Time - time it takes to access a particular data item
Insertion Time - time it takes to insert a data item
Deletion Time - time it takes to delete a data item
Space Overhead - additional space occupied by an index
structure
Dense Index
234
Hotel Sofitel
A-212
Hotel Sofitel
321
Hilton
B-321
Hilton
Westin
Marriot
389
Hilton
C-002
396
Hilton
A-322
112
Westin
C-034
253
Westin
B-219
501
Marriot
B-069
532
Marriot
C-304
221
The Ritz
A-007
The Ritz
Sparse Tree
Hotel Sofitel
Westin
The Ritz
234
Hotel Sofitel
A-212
321
Hilton
B-321
389
Hilton
C-002
396
Hilton
A-322
112
Westin
C-034
253
Westin
B-219
501
Marriot
B-069
532
Marriot
C-304
221
The Ritz
A-007
Hotel Sofitel
Westin
The Ritz
234
Hotel Sofitel
A-212
321
Hilton
B-321
389
Hilton
C-002
396
Hilton
A-322
112
Westin
C-034
253
Westin
B-219
501
Marriot
B-069
532
Marriot
C-304
221
The Ritz
A-007
Efficiency Issues
Even if we use a sparse index, the index itself may become
Hotel Sofitel
Marriot
Marriot
Hotel Sofitel
Hilton
Westin
Marriot
The Ritz
234
Hotel Sofitel
A-212
321
Hilton
B-321
389
Hilton
C-002
396
Hilton
A-322
112
Westin
C-034
253
Westin
B-219
501
Marriot
B-069
532
Marriot
C-304
221
The Ritz
A-007
Example?