Tuesday 12 November 2013

Question 15: Clustered Indexes

An index is clustered, if

(A) it is on a set of fields that form a candidate key.
(B) it is on a set of fields that include the primary key.
(C) the data records of the file are organized in the same order as the data
(D) the data records of the file are organized not in the same order as the data

Answer: (C)

Explanation:
Clustered index is index whose search key specifies the sequential order of the file. Clustered index key is usually but not necessarily the primary key (link). Hence the right answer is C.

Lets evaluate the options one by one.
(A) it is on a set of fields that form a candidate key : ?
(B) it is on a set of fields that include the primary key.: If the index is on primary key (or on the fields including the primary key), it is definitely a clustered index. But if it a clustered index, it is not necessary that it would include the primary key.
(C) the data records of the file are organized in the same order as the data : This is correct
(D) the data records of the file are organized not in the same order as the data: This is not true according to the definition of clustered index.

Concepts to revise
Indexing & Hashing

References

No comments:

Post a Comment