First time here? Checkout the FAQ!
+9 votes

A file is organized so that the ordering of the data records is the same as or close to the ordering of data entries in some index. Than that index is called

  1. Dense
  2. Sparse
  3. Clustered
  4. Unclustered 
asked in Databases by Veteran (38.8k points)   | 1.4k views

1 Answer

+21 votes
Best answer

Clustered- this is the definition of clustered indexing and for the same reason a table can have only one clustered index.

answered by Veteran (294k points)  
selected by
@arjun sir why not sparse it is also ordered
I think clusterd index is known if the file is ordered based on the index..

and clusterd index have two type

sparse index

dense index

in sparse index for some some of the key values we have entry in index file

in dense index for every search key we have an entry in index file

although dense index could also be non clustered this case for every record we have an entry
why not Dense indexing??
I guess it is because the definition of dense indexing says that for every search key value there must be an entry in the index file but it says nothing about the ordering. Dense indexing may or may not be ordered. But Clustured is always ordered.
Sparse index doesnot require  entry for every search key

Dense index require entry for every search key value

Clustered index requires unique entry(like primary index) for every table. Clustered index always will be sort in ascending order(whatever input u give), i.e. if u give input






as input

it will arrange automatically 1 2 3 4 5 in the table

i.e. why there is only 1 clustered index in a table
but sparse also have same order of keys just some keys are missing from the index but order will be same no ?
Have you read it somewhere? Because whatever places i have studied this thing from, there was no mention of sparse indexing to be necessarily ordered. If you have kindly share the link.
" ordering of the data records is the same as or close to the ordering of data entries in some index "

what is difference between data records and data entries in some index?

data entries means entries in each row, rt?

then what is meaning of data records?
I guess data records refer to the records that are there in the data file while data entries here refer to the ones in the index file.
So, If I think about a book

Index page each entry contains data entries

And according that entry if we go that page of the book, that is data record

Yes! That is what I think.

yes sparse index also sequential

but there every record neednot get an entry

The Line is :" ordering of the data records is the same as or close to the ordering of data entries in some index "

The good example of clustering index is telephone directory

Where the index pages start with say "M". All entries in that pages is with M or N or we can say very close to M.

That is why it is clastering index as ans

(While only book is an example of unclustered index)


Top Users Sep 2017
  1. Habibkhan

    7092 Points

  2. Warrior

    2574 Points

  3. Arjun

    2408 Points

  4. rishu_darkshadow

    2402 Points

  5. A_i_$_h

    2198 Points

  6. nikunj

    1980 Points

  7. manu00x

    1846 Points

  8. makhdoom ghaya

    1760 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points

26,113 questions
33,691 answers
31,098 users