+1 vote
124 views

Consider the following statement below:

$A)$ A clustered index may be either sparse or dense.

$B)$ Every $B^{+}$ tree index is dense.

Which of the above statement is true?

Is clustering Index can be dense. Dense means non-ordering field, but clustering field should be ordering field

right??

| 124 views
+1

dense indexing does not actually means non ordering, u may think the same because we use it in secondary indexing but what dense indexing actually means is that all the index are present in the index table. Clustered indexing are done on non key attributes but we arrange them in order..

Now say we have non key attributes which are all distinct, then all the indexes must be present in the index table, so in this case it is dense indexing.

Consider another case where the non key attributes have repetition, so after sorting them, the same values will lie in contiguous blocks, so only one of such duplicate index will be enough in the indexing table for accessing those subsequent blocks. So this time it is Sparse Indexing.

and Sparse b+ tree indexing is possible.

0

Sparse b+ tree indexing is possible

r u sure?? Every B+ tree node has a record in leaf level

right??

+1
0
yes, good point
0

@Hirak

In the same question, if we solve with dense indexing, then answer will be 2000

right??

0
Have not solved it...
+1

A clustered index is sparse index, right? I have lots of confusion regarding this matter:

https://gateoverflow.in/30109/question-on-dense-index

https://gateoverflow.in/213537/isro2018-51

This image is from Fundamentals of Database Systems Seventh Edition by Navathe