The Gateway to Computer Science Excellence
+1 vote
76 views

1. Why in question They treat both clustered and primary indices Different, because both are the same thing(written in Korth).

Only the thing is Primary indices means search key is Primary Key and Clustered means it can be any search Key and both defines the same order as the order of database records right ?

Like in this Question :https://gateoverflow.in/414/gate2008-16-isro2016-60      the answer should be both A and C right ?

 

2. Can we have One Clustered and one unclustered indices on different set of attributes for the Records ? I know the records are only physically ordered in one way But Say i took Primary key which is in order with file and created a clustered index and i took another attribute not in the order say Salary and created a different Secondary index on the Records ?

in Databases by Loyal (7k points) | 76 views
0

1.primary index=search key is based on ordered field +primary key .

Clustering index=search key is based on ordered field +non key .

Indexes should be look like this ,

primary index-$ \boldsymbol {EID} $  is  primary key and index is ordered ,

Eid  

2

4

 

6

8

 

10

12

 

Clustering index - $\boldsymbol {Dno.}$  is non key and ordered.,

Dno.  

2

2

 

3

3

 

3

4

 

As we can see in clustering index has clustered like {2,2} {3,3,3}...which can't be key .yes clustering index can be same as primary when clustered is not present.and given question ,answer only be a option A.

Please log in or register to answer 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
50,741 questions
57,252 answers
198,061 comments
104,697 users