What is the difference between a primary index and a
secondary index? What is a duplicate data entry in an index?
Can a primary index contain duplicates?
Answer Posted / khadija
1.A primary index is an index on a set of fields that includes the unique primary key for the field and is guaranteed not to contain duplicates. A Secondary index is an index that is not a primary index and may have duplicates.
2.Example,
Employee ID can be Example of it. Example,
Employee name can be example of it. Because Employee name can have similar values.
3.The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
4.The index in which the sort order of a search key is similar
to the sort order of a relation then the index is called
primary index. Ex, front index of the book. While in secondary index the order of the search key is in
different order from the order of the key in file. Ex, index
in back side of some book.
5.In the case of
Primary Index both keys and addresses of the records are
kept in order to search a particular record faster. In the case of Secondary Index only the addresses of the
records are kept in the index not the key.
6.There can be only one primary index. There can be many secondary indices.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the process of the user request and data generating?
How you can make a parameterized view?
Explain about the database management systems.
What is dbms explain in brief?
Which data type cannot be used as a parameter in a udf?
Explain about the storage and physical database design?
Can an extended stored procedure be called from inside a user-defined function?
Explain about query and reporting.
Who are end users in dbms?
Where is dbms used?
What are the constraints on severity level in raiseerror?
Explain the role of indexing in databases?
What is normalization? Explain different levels of normalization?
What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?
What are the types of database model?