What is Indexed Sequential File Organization

Different types of Indexing Techniques:

1) ordered indices: This indices is based on the sorted ordering of the values.

2) Hashed indices: Based on the values being distributed uniformly across a range of buckets. The bucket to which the value is assigned is determined by a function called a Hash Function.

Ordered Indices:Index is associated with a particular search key.

The records in the indexed file may themselves be stored in some sorted order.

A file may have several indices on different search key.

Two types of Ordered Indices:

a) primary index

b) secondary index

Primary Index:

Let us assume we have a file whose records are ordered sequentially on some key. We create an index file of this file in which the search keys are also ordered same as the order of the file. So such index files is called primary index. and such files with primary index is called index sequential file. Primary indices are also called clustering indices.

Types of primary index

Dense Primary Index:

In this index record contains the search-key value and a pointer to the first data record, with that search key value.

The rest of the records with the same search key-value would be stored sequentially after the first record.

Primary index

Disadvantages of Dense Primary Index:

• It has to store a list of pointers to all records with the same search-key value.

• It takes some extra time in Search and an extra space in primary index file.

Facebook Likes