Unit-3 Part 2 Indexing and Hashing
Unit-3 Part 2 Indexing and Hashing
● Basic Concepts
● Ordered Indices
● Static Hashing
● Dynamic Hashing
INDEXING
Ordered Indices
1)Primary Index
i) Dense Index
ii) Sparse Index
iii) Multilevel Index
2)Secondary Index
Basic Concepts
● Indexing mechanisms used to speed up access to desired data.
● E.g., Index in a book to find a particular topic.
● An index file consists of records (called index entries) of the
form
search-key pointer
● Index files are typically much smaller than the original file.
● Two basic kinds of indices:
● Ordered indices: search keys are stored in sorted order
● Hash indices: search keys are distributed uniformly across
“buckets” using a “hash function”.
Index Evaluation Metrics
● Access types
● records with a specified value in the attribute (or)
● records with an attribute value falling in a specified
range of values (e.g. 10000 < salary < 40000)
● Access time
● Insertion time
● Deletion time
● Space overhead
Ordered Indices
● In an ordered index, index entries are stored in the sorted
order of the search key values.