How many block accesses average saved on using secondryindex, Database Management System

Assignment Help:

An un- ordered student file has 20,000 records stored on a disk having the Block size as 1 K. Suppose that each student record is of 100 bytes, the secondary index field is of 8 bytes, and block pointer is also of 8 bytes, find how many block accesses on average may be saved on using secondary index on enrolment number.

Answer:

Number of accesses without using Secondary Index:

Number of records in the file = 20000

Block size = 1024 bytes

Record size = 100 bytes

Number of records per block = integer value of [1024 / 100] = 10

Number of disk blocks acquired by the file = [Number of records / records per block]

= [20000/10] = 2000

 

As the file is un-ordered any search on an average will require about half of the above blocks to be accessed. Thus, average number of block accesses = 1000

Number of accesses with Secondary Index:

Size of an index entry = 8+8 = 16 bytes

Number of index entries that can be stored per block

= integer value of [1024 / 16] = 64

Number of index entries = number of records = 20000

Number of index blocks = ceiling of [20000/ 64] = 320

Number of index block transfers to find the value in index blocks = ceiling of [log2320] = 9

One block move will be needed to get the data records using the index pointer after the needed index value has been located. So total number of block transmits with secondary index = 9 + 1 = 10

Therefore,, the Secondary index would save about 1990 block transmit for the given case. This is a huge saving compared to primary index. Please also compare the size of secondary index to primary index.

Let us now see an illustration of a secondary index that is on an attribute that is not an alternate key.

 

 

 

 

                                269_how many block accesses average saved on using Secondryindex.png


Related Discussions:- How many block accesses average saved on using secondryindex

What is abstraction, What is abstraction? Abstraction in the object ori...

What is abstraction? Abstraction in the object orientation is a idea that provide opportunity to express necessary properties of object without providing much details of the im

Explain saving derived attributes to avoid re-computation, Saving Derived A...

Saving Derived Attributes to Avoid Re-computation   As discussed, "redundancy means duplication of exact data". But, if multiple copies of same data are present in the system,

What is storage manager, What is storage manager? A storage manager is ...

What is storage manager? A storage manager is a program module that gives the interface among the low level data keeps in a database and the application programs and queries su

State the process of inheritance adjustment, Inheritance Adjustment As...

Inheritance Adjustment As in object oriented analysis and design terms inheritance defines a relationship between classes, where as one class shares structure or behaviour def

Normalization-e-r mapping , Normalize the following table upto and includin...

Normalize the following table upto and including the 3NF. Submit a 1 page printout of only the final set of normalized tables in Data Architect. Just use Data Architect to do the t

Create the database in oracle using ddl, The Assessment page has a link to ...

The Assessment page has a link to download a conceptual model, and a list of data. You are to map this conceptual model, and create the database in Oracle using your own DDL.  T

Objectives of data management, The traffic data mgmt. systems infrastructur...

The traffic data mgmt. systems infrastructure plan describes the software, hardware, data network, and other elements that will support the TDMS. The infrastructure plan is based o

Fragmentation-design of distributed databases, Fragmentation: It is defini...

Fragmentation: It is definite as partitioning of a relation into various fragments.Every fragment can be stored at a dissimilar site.

Draw an e-r diagram and convert it to a relational schema, In an organisati...

In an organisation various projects are undertaken. Each projects can employ one or more employees. Every employee can work on one or more projects. Each project is undertaken on

What is mysql, What is MySQL? MySQL is a relational database management...

What is MySQL? MySQL is a relational database management system which has eleven million installations. It can be used for both Linux and Window. Managing database includes add

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