Hash-Based Indexing

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

Hash-Based Indexing

Uses a hash function to map search keys to index buckets

2
New cards

Hash Function

Computes bucket number from search key (e.g., h(key) mod N)

3
New cards

Bucket

A page (or set of pages) that holds records with the same hash value

4
New cards

Static Hashing

Fixed number of buckets; doesn't adapt to data growth

5
New cards

Hash Index Use Case

Best for equality searches, not suitable for range queries

6
New cards

Overflow Bucket

Used when a bucket becomes full (chaining)

7
New cards

Bucket Overflow Problem

Leads to long chains and slower lookups

8
New cards

Extendible Hashing

Hash index that grows and shrinks dynamically

9
New cards

Global Depth (Extendible Hashing)

Number of bits used in the directory index

10
New cards

Local Depth (Extendible Hashing)

Number of bits a bucket uses to identify its entries

11
New cards

Directory (Extendible Hashing)

Array of 2^global_depth pointers to buckets

12
New cards

Bucket Split (Extendible Hashing)

Occurs when a bucket is full and local depth < global depth

13
New cards

Doubling Directory (Extendible Hashing)

Occurs when local depth = global depth during a split

14
New cards

Directory Shrinking

Allowed if all buckets have local depth < global depth

15
New cards

Linear Hashing

Hash index without a directory; grows one bucket at a time

16
New cards

Split Pointer (Linear Hashing)

Tracks which bucket to split next

17
New cards

Level (Linear Hashing)

Indicates the number of hash bits in use

18
New cards

Hash Function in Linear Hashing

Two functions used: hlevel and hlevel+1

19
New cards

Linear Hashing Growth

Buckets split gradually; no doubling of directory

20
New cards

Hash Index on Primary Key

Faster equality lookup on unique attribute

21
New cards

Hash Index on Secondary Key

May require overflow pages for duplicates

22
New cards

Clustered Hash Index

Not possible — hashing scatters data, can't cluster records

23
New cards

Unclustered Hash Index

Most common; index points to heap records

24
New cards

Hash Index Advantage

Fast equality lookup with O(1) average-case access

25
New cards

Hash Index Limitation

No support for range or ordered queries

26
New cards