What is the use of database index (apart from fast searching of records);What is use of composite key ?

Showing Answers 1 - 2 of 2 Answers

Phaneesh

  • Feb 1st, 2006
 

Indexes are useful for maintaining unique values in a column, since the database can easily search the index to see if an incoming value already exists. Primary keys are always indexed for this reason.

        By default Primary keys will create Clustered Index(where tipical values are stored in Leaf level),

              UNIQUE will create Non Clustred Index(where the references of the values are stored)

         Since index entries are stored in sorted order, indexes also help when processing ORDER BY clauses.

  Was this answer useful?  Yes

Deepak

  • Dec 31st, 2006
 

Index is used for the fast retrieval of data from the table. there are two types of indecs Clustered and Non clustered. Cluster index is created on primary key and it can be only on per table where as non cluster index can be created on any column and it can be more than one in a table.

Composite key is the combination of more than one attribute. Composite key is is created when it is not possible to identify one column in a table that has unique values. In such situation combination of more than column is choosen by which a record can be identified easily and clearly.It is just like primary key.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions