in Databases
1,730 views
2 votes
2 votes

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??

in Databases
by
1.7k views

4 Comments

@Hirak

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

right??

0
0
Have not solved it...
0
0

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

https://cs.stackexchange.com/questions/21365/clustered-index-is-dense-or-sparse 

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 

2
2

1 Answer

0 votes
0 votes

A ) clustered index will be dense index if there is no duplicate values in data file

and A clustered index will be sparse if there is duplicate values in data file and duplicate value only have one entry in clustered index making it sparse index 

so A is True

B ) if data file is sorted, then leaf may constitute sparse index.

if data file is unsorted then leaf have to constitute dense index.

so B is False here

it is logical so i think no reference is required but otherwise u can see here https://cseweb.ucsd.edu/classes/fa19/cse132A-a/slides/indexing.pdf

 

 

Related questions