The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
68 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??

in Databases by Veteran (115k points) | 68 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://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 

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,092 questions
55,276 answers
190,803 comments
86,086 users