Types of indexes, Database Management System

Types Of Indexes

One of the words used during the file organisation is the term index. In this part, let us describe this term in more detail.

We find the index of keywords at the end of every book. Notice that this index is a sorted list of page numbers (address) and keywords (index values) where the keyword can be found. In databases also an index is defined in a same way, as the pair.

The basic benefit of having sorted index pages at the end of the book is that we can situate a desired keyword in the book. We could have used the topic and sub-topic listed in the table of contents, but it is not essential that the given keyword can be found there; also they are not in any sorted series. If a keyword is not even searched in the table of contents then we require to search each of the pages to find the necessary keyword, which is going to be very cumbersome. Therefore, an index at the back of the book helps in locating the needed keyword references very simply in the book.

The same is true for the databases that have very big number of records. A database index permits fast search on the index value in database records. It will be complex to locate an attribute value in a huge database, if index on that value is not given. In such a case the value is to be searched record-by-record in the whole database which is time consuming and cumbersome. It is essential to note here that for a large database the whole records cannot be contain in the main memory at a time, therefore, data needs to be transferred from the secondary storage device which is more time consuming. Therefore, without an index it may be complex to search a database.

An index has a pair consisting of index value and a list of pointers to disk block for the records that have the similar index value. An index has such information for each stored value of index attribute. An index file is extremely small compared to a data file that stores a relation. Also index entries are ordered; so that an index can be seek using an efficient search method like as binary search. In case an index file is extremely large, we can make a multi-level index, that is index on index.

There are many parts of indexes those are categorised as:

Primary index

Single level index

Spare index

Secondary index

Multi-level index

Dense index

Clustering index

 

 

 

A primary index is defined on the attributes in the order of which the file is kept. This field is known as the ordering field. A primary index can be on the primary key of a file. If an index is on attributes other than candidate key fields then various records may be related to one ordering field value. This is known as clustering index. It is to be noted that there can be only single physical ordering field. Therefore, a file can have either the clustering index or primary index, not both. Secondary indexes are definite on the non-ordering fields. Therefore there can be various secondary indexes in a file, but only clustering index or one primary.

Posted Date: 3/7/2013 6:22:39 AM | Location : United States







Related Discussions:- Types of indexes, Assignment Help, Ask Question on Types of indexes, Get Answer, Expert's Help, Types of indexes Discussions

Write discussion on Types of indexes
Your posts are moderated
Related Questions
Describe the GRANT function and explain, how it associates to security. What kind of privileges may be granted? How are they revoked? Ans: Since more than one user can aacce

What is the difference between WHERE and HAVING clauses?. Predicates in the WHERE clause applies to every tuple while the predicate in the HAVING clause applies to groups.

Explain Authorization and Integrity Manager ? Authorization and Integrity Manager: Tests for the satisfaction of integrity constraints and checks the authority of users to acce

Explain the ANSI SPARC architecture The three-schema architecture is as well known as ANSI SPARC architecture. The aim of the three-schema architecture is to separate the user

Project Description: This is going to be a School portal to handle each activities in school such as, School fees payment, online registration and every other payment, course re

When is a transaction rolled back? Any changes that the aborted transaction made to the database must be uncompleted. While the changes caused by an aborted transaction have be

Write the C++ program having class name studentinfo, that is used to store the VU student information: This class should store your VUID, campus id, name and father name in the fol

DISADVANTAGES OF RDBMS

Define null values. In some cases a certain entity may not have an applicable value for an attribute or if we do not know the value of an attribute for a certain entity. In the

Durability : This property necessitates that once a transaction has committed, the changes made by it be never lost because of subsequent failure. Thus, a transaction is also a bas