expand icon
book Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe cover

Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe

Edition 6ISBN: 0136086209
book Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe cover

Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe

Edition 6ISBN: 0136086209
Exercise 10
Exercise 16.27
Consider a disk with the following characteristics (these are not parameters of any particular disk unit): block size B=512 bytes, interblock gap size G=128 bytes, number of blocks per track=20, number of tracks per surface=400. A disk pack consists of 15 double-sided disks.
-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 16.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.
Explanation
Verified
like image
like image

(a) R = (30 + 9 + 40 + 9 + 8 + 1 + 4 + 4...

close menu
Database Systems 6th Edition by Ramez Elmasri, Shamkant B. Navathe
cross icon