Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Are

  1. Primary Index and Clustered Index similar in concept

  2. Secondary Index and Non-Clustered Index similar in concept

share|improve this question
    
I'm not sure I understand your question, it's a bit unclear. Do you associate (put equal between) primary index with clustered index and secondary with non-clustered? If so you're actually asking if there is any fundamental difference between a Clustered Index and a Non-Clustered Index? –  Marian Nov 27 '12 at 12:03
    
@Marian i want to know if Primary Index and Clustered Index are Synonym,Secondary Index and Non-Clustered Index are Synonym –  Some1.Kill.The.DJ Nov 27 '12 at 12:04
2  
Primary index and secondary index aren't common terms in SQL Server AFAIK. Primary Key, clustered index and non clustered index all are though. Do you have a particular RDBMS in mind? Where did you come across these terms? –  Martin Smith Nov 27 '12 at 12:45
1  
@Some: "common" does not mean "synonym" –  ypercube Nov 27 '12 at 14:06
1  
I would guess that the terms are synonyms, as pointed out already. Found some references in the MySQL documentation, too: Clustered and Secondary Indexes, How to exploit MySQL index optimizations. –  Marian Nov 27 '12 at 14:07
show 13 more comments

1 Answer

up vote 5 down vote accepted

And it looks like curiosity didn't actually kill the cat :-). So I found this book Database System Concepts (Sixth Edition) online and it's freely available to be read. I've scratched it a bit and it turns out that it has the needed definition inside:

Primary index: in a sequentially ordered file, the index whose search key specifies the sequential order of the file. Also called clustering index. The search key of a primary index is usually but not necessarily the primary key.

Secondary index: an index whose search key specifies an order different from the sequential order of the file. Also called non-clustering index.

So there you have it. Now I suppose you were reading another book (by same author(s)) which was with tests inside (Q&A) and not this one with theory. I'd say you should use them both at the same time.

Now, I'm not sure that a general book would be the best way to start. Personally I'd start with any freely available kit (SQL Server Express, MySQL Lamp, Oracle XE, SQLite...whatever sounds good for your ear) and play with concepts and also their physical implementation. I'd say going also with examples will work better than just pure theory.

share|improve this answer
    
that was really helpfull –  Some1.Kill.The.DJ Nov 28 '12 at 7:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.