Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 searchStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started