The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+14 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 (42.9k points) | 1.9k views

1 Answer

+22 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 (327k 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)


Dense and sparse are not the types of indexes, they are only the methods to store index enteries.

Clustred is indeed a correct answer for this question!

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

29,157 questions
36,984 answers
34,824 users