Question: SQL Question A file has r=200000 STUDENT records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes),

SQL Question

SQL Question A file has r=200000 STUDENT records of fixed-length. Each record

A file has r=200000 STUDENT records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes), PHONE (10 bytes), BIRTHDATE (8 bytes), SEX (1 byte) MAJORDEPTCODE (3 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 Question 1. (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 1. the file blocks are stored contiguously, and 2. if 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!