A file has r=20,000 STUDENT records of fixed-length. Each record has the following fields: NAME (30 bytes),

Question:

A file has r=20,000 STUDENT records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), MAJORDEPTCODE (4 bytes), MINORDEPTCODE (4 bytes), CLASSCODE (4 bytes, integer), and DEGREEPROGRAM (3 bytes). An additional byte is used as a deletion marker. The file is stored on the disk whose parameters are given in Exercise 17.27.
(a) Calculate the record size R in bytes.
(b) Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned organization.
(c) Calculate the average time it takes to find a record by doing a linear search on the file if (i) the file blocks are stored contiguously and double buffering is used, and (ii) the file blocks are not stored contiguously.
(d) Assume the file is ordered by SSN; calculate the time it takes to search for a record given its SSN value by doing a binary search.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Fundamentals of Database Systems

ISBN: 978-0136086208

6th edition

Authors: Ramez Elmasri, Shamkant Navathe

Question Posted: