Indexing Flashcards Preview

COSC 404 > Indexing > Flashcards

Flashcards in Indexing Deck (11):
1

What is an index?

A data structure that allows for fast lookup for records in a file

2

Can an index allow records to be retrieved in sorted order?

Yes it can allow that

3

Describe a data file and and index file

Data File: the file that actually contains the records

Index File: The file that stores the index information

4

What is a Search Key

The set of attributes stored by the index to the find records in the data file

5

does the search key have to be unique?

NO it doesn't, more than one record may have the same search key value

6

What is an index entry?

One index record that contains a search key value and pointer to the location of the record with that value

7

What is the difference between ordered and unordered files?

Ordered files are sorted on the search key, unordered files are not

8

Dense vs Sparse indexes

A dense index has an index entry for every record in the data file

A sparse index has index entries for only some of the data file records

9

Primary (clustering) indexes vs Secondary indexes

A primary index sorts the data file by its search key. The search key doesn't have to be the same as the primary key

A 2NDary index doesn't determine the organization of the data file

10

Single-Level vs Multi-Level indexes

Single-level indexes have only one index level

multi-level indexes have several levels of indexes on the SAME FILE

11

Formula for sparse index based on key?

log2(N)