0
1.6kviews
Explain Indexing and its types.
1 Answer
0
4views

Indexing:

  • For a file with a given record structure consisting of several fields, an index access structure is defined on a single field of file, called an indexing field.

  • An index on a file speeds up selection on the search key fields for the index.

  • An index file consists of records (called index entries) of the form:

enter image description here

where search key is set of attributes used to look up records in a file.

1] Dense Index:

  • It has an index entry for every search key value in the data file.

  • for example, index on ID attribute of emp relation.

enter image description here

  • Dense index are bulkier in size.

  • secondary index are normally dense index.

2] Sparce Index:

  • It has index entries for some of the search key values.

  • It has fewer entries than the number of records in the file.

  • The primary index is a sparce index.

  • For example employee city is an sparce index.

enter image description here

Please log in to add an answer.