Difference among a primary index and a secondary index, Database Management System

Assignment Help:

What is the difference among a primary index and a secondary index?

Primary Index: A primary index is an ordered file whose records are of fixed length along with two fields. The first field is the ordering key field-known as primary key-of the data file, and the second field is a pointer to a disk block. There is one index entry in the index file for every block in the data file. Each index entry has the value of the primary key field for the first record within a block and a pointer to in which block as its two field values. A major problem along with a primary index is insertion and deletion of records. If we attempt to insert a record in its right positioning the data file, we have to not only move records to make space for the latest record but also change a few index entries.

Secondary Index: A secondary index is also an ordered file along with two fields. The first field is non-ordering field of the data file in which is an indexing field. The second field is either a block pointer or a record pointer. A secondary index on a candidate key looks just such as a dense primary index, except in which the records pointed to through successive values in the index are not stored sequentially.

 


Related Discussions:- Difference among a primary index and a secondary index

Explain hash file organization, Explain hash file organization? Hash fu...

Explain hash file organization? Hash functions a) The distribution is uniform Hash functions assign each bucket the similar number of search -key values from the set of a

Create database and define relationships between tables, Instructions: ...

Instructions: Follow the instructions below for completing this project: 1. Creating the Database: · Use the physical table descriptions given below to define and create each t

Database application and creation, Create Relational Database Model (RDM) f...

Create Relational Database Model (RDM) for Sailing bed and breakfast club Table_Name( attribute_1, attribute_2, attribute_3, ? ,attribute_x) Primary Key ( attribute_1, attribute_2)

Explain odbc, Explain ODBC? ODBC - Open DataBase Connectivity (ODBC) e...

Explain ODBC? ODBC - Open DataBase Connectivity (ODBC) enable the integration of SQL along with a general-reasons programming language.

Describe queries with complex types, Describe queries with complex types? ...

Describe queries with complex types? The present extension of the SQL query language deal with the complex type Let us start with the simple example: Find the title and t

Explain trigger, Explain trigger? Trigger: A database trigger is proc...

Explain trigger? Trigger: A database trigger is procedural code which is automatically executed within response to certain events on a particular table in a database. Trigger

Compute natural join and outer join, For the relations R and S given below:...

For the relations R and S given below: R                      S A B C 1 4 7 2 5 8 3 6 9

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd