GATE / CS ARCHIVE

SIMILAR QUESTIONS / DATABASE MANAGEMENT SYSTEMS

Identify a clustering index on an ordered nonkey field

3 questions solved the same way, newest first. Back to Database Management Systems

How these are solved

Match physical ordering on a nonkey search field to a clustering index; primary and secondary definitions depend on key/ordering conditions.

1 mark · MCQ
Report issue

Indexing, Storage & Query Processing

Question 32, GATE 2015: A file's data-record order is the same as, or close to, the order of entries in an index. What kind of index is it? A dense; B sparse; C clustered; D unclustered.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Clustering concerns how the data records themselves are arranged relative to the search key, making nearby key values physically nearby. Dense versus sparse concerns how many index entries exist, not whether the underlying file follows the key order. Therefore density alone cannot answer the question. An unclustered index may point to records scattered throughout the file.

Solution: A clustered index determines the physical ordering/grouping of the underlying data records on its search key. Thus C.

Original paper, page 12 · Answer key

1 mark · MCQ
Report issue

Clustered-index definition

Indexing, Storage & Query Processing

Question 15, GATE 2013: An index is clustered if A its fields form a candidate key; B its fields include the primary key; C data records follow the same order as index data entries; D data records do not follow that order.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

A clustered index has its data records physically organized in the same order as the index’s data entries. This is about file ordering, not merely whether the indexed fields form a candidate or primary key. Hence C.

Clustering describes physical locality/order of the records relative to the index ordering. Scanning adjacent index entries can therefore correspond to nearby ordered records. Key uniqueness is a different property: an index can be clustered on a nonunique field, and a primary-key index need not determine the physical record order in every storage design. Thus C states the defining relationship, while A/B confuse clustering with key constraints and D describes the opposite relationship.

Original paper, page 4 · Answer key

1 mark · MCQ
Report issue

Classical clustering-index classification

Indexing, Storage & Query Processing

Question 16, GATE 2008: A clustering index is defined on fields of which type?

(A) Non-key and ordering
(B) Non-key and non-ordering
(C) Key and ordering
(D) Key and non-ordering
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. An ordering field determines the physical ordering of the data file.
2. If that field is non-key, multiple records can share a value and form a contiguous cluster, indexed by a clustering-index entry.
3. This classical classification gives A. An ordering key instead gives a primary index; a non-ordering field gives a secondary index. Modern clustered-index terminology can be broader.

Original paper, page 4