retagged by
1,941 views
2 votes
2 votes
Which of the following statements is TRUE ?

A) Every primary index is also a clustered index.

B) Every clustered index is also a primary index.

C) Both primary index and clustered index are one and the same,

D) An index can be either primary or clustered but not both.
retagged by

3 Answers

2 votes
2 votes

See, first read these lines from standard books and then conclude what is true and what is false.

first what is CLUSTERD INDEX. Ramakrishnan says

When a file is organized so that the ordering of data records is the same as
or close to the ordering of data entries in some index, we say that the index
is clustered; otherwise, it clustered is an unclustered index.

Navathe says:-

There are several types of ordered indexes. A primary index is specified on the ordering key field of an ordered file of recordsand every record has a unique value for that field.If the ordering field is not a key field—that is, if numerous records in the file can have the same value for the ordering field—another type of index, called a clustering index, can be used.

it means Clusterd index can be implemented using Primary index on a key field ,or using on a non-key field.

So,A) is true 

B) and C) is false

For option D) read these lines from navathe

 An ordering key field is used to physically order the file records on disk.So, a file can have at most one physical ordering field, so it can have at most one primary index or one clustering index, but not both.

So, D) is true

1 votes
1 votes

In clustered indexing ,index file and and orignal file have same order.

In primary indexing,index is built on key field and data in file is sorted according to key field.

A) Every primary index is also a clustered index.----->true beacuse in primary index also order of index and file is same.

B) Every clustered index is also a primary index.----> not true because clustered index can be unsorted.

C) Both primary index and clustered index are one and the same.------> false.

D) An index can be either primary or clustered but not both.------->false ,any primary index have both.

0 votes
0 votes
Clustered Index : In this type of Index, an index file contains entry of each distinct value of indexed attribute.

Primary Key when used as indexed attribute, each will be a distinct value hence For every primary key attribute index file will have an entry. Hence Every Primary Index is also a Clustered Index.

 

Please correct me if I am wrong.

No related questions found