Indexing Flashcards

1
Q

What is a search key?

A

Attribute or set of attributes used to look up records in a file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the structure of an index entry?

A

search-key | Pointer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What factors have to be taken into account in index design?

A
  • Access types
  • Access time
  • Insertion time
  • Deletion time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a primary index

A

index whose search-key specifies the order of records in the data file, usually the primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a secondary indice?

A

Index that allows search order different from sequential order of file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a dense index?

A

Index records appears for every search-key value in the file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a sparse index?

A

Index records only stored for some of the key values. Find record with key <= K and scan sequentially from that record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the efficiency concerns when using indexing?

A

Advantages: Dense gives faster lookups, sparse takes less space and requires less maintenance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s a good compromise between sparse and dense indexing?

A

Sparse index with an index record for every disk block.

Index corresponds to least key value in block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does multi-level indexing work?

A

Outer index: Sparse index of primary index

Inner index: The primary index file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly