search
Log In
1 vote
123 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 123 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.

Related questions

1 vote
2 answers
1
352 views
what is the minimum and maximum number of keys for non-leaf nodes and leaf nodes for B+ Tree of order p?
asked Nov 23, 2018 in Databases aditi19 352 views
0 votes
1 answer
2
147 views
In this Question :- Let there is a Table named Stud_records with 3000 records of fixed length , each record size is 50 Bytes and records are stored in a block of size 512 Bytes , If secondary index is built on the key field of size 10 Bytes and a block pointer of size 5 Bytes , then ... = 88 Blocks The number of blocks in First level index = (88 * 15)/512 = 3 ???? Why am i wrong ?? Please Help?
asked Apr 12, 2018 in Databases Na462 147 views
2 votes
1 answer
3
207 views asked Oct 25, 2017 in Databases Arnabi 207 views
0 votes
1 answer
4
266 views
Block size 1000 B Search key 12 B Pointer size 8B What is max records of DB 1) For Dense index B+ tree of 2 level 2) For Sparse index B+ tree of 2 level How ans will differ , Plz show
asked Sep 16, 2017 in Databases srestha 266 views
...