Calculate the record size r in bytes

Assignment Help Basic Computer Science
Reference no: EM13926527

1. 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. 
Consider B=512

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.

2. A PARTS file with Part# as hash key includes records with the following Part# values: 2369, 3760, 4692, 4871, 5659, 1821, 1074, 7115, 1620, 2428, 3943, 4750, 6975, 4981, 9208. The file uses 8 buckets, numbered 0 to 7. Each bucket is one disk block and holds two records. Load these records into the file in the given order using the hash function h(K)=K mod 8. Calculate the average number of block accesses for a random retrieval on Part#.

3. Suppose that a file initially contains r=120,000 records of R=200 bytes each in an unsorted (heap) file. The block size B=2400 bytes, the average seek time s=16 ms, the average rotational latency rd=8.3 ms and the block transfer time btt=0.8 ms. Assume that 1 record is deleted for every 2 records added until the total number of active records is 240,000.

a.How many block transfers are needed to reorganize the file?

b.How long does it take to find a record right before reorganization?

c.How long does it take to find a record right after reorganization?

4. A PARTS file with Part# as key field includes records with the following Part# values: 23, 65, 37, 60, 46, 92, 48, 71, 56, 59, 18, 21, 10, 74, 78, 15, 16, 20, 24, 28, 39, 43, 47, 50, 69, 75, 8, 49, 33, 38. Suppose the search field values are inserted in the given order in a B + -tree of order p=4 and p leaf =3; show how the tree will expand and what the final tree looks like.

5. Develop cost functions for the PROJECT, UNION, INTERSECTION, SET DIFFERENCE, and CARTESIAN PRODUCT algorithms discussed in section 19.4.

6. Extend the sort-merge join algorithm to implement the LEFT OUTER JOIN operation.

Reference no: EM13926527

Questions Cloud

Code of ethics, professional ethics : Although though some people do not follow a code of ethics, professional ethics is very important to the success of a business. It is important for all managers to conduct business, internally and externally, ethically and with the utmost integri..
Calculate the number of letters : Write an application where you ask the user to input the price per letter (PPL), and then ask the user to input the sentence they want printed. The application should then calculate the number of letters and give the user the total cost in the fol..
Calculate mcphersons earnings per share : Calculate McPherson's earnings per share if the McAlester stockholders accept one $6 convertible preferred share (stated value, $100) for each 5 shares of McAlester stock held.
Reasonable interpretation of the survey results : Which of the following represents a reasonable interpretation of the survey results? For those not reasonable, explain the ?aw.
Calculate the record size r in bytes : 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.
What are the disadvantages to moving to a hris : Using the Internet, describe at least five ways IT has helped change HR. What are the disadvantages to moving to a HRIS
Under rated operating conditions what is motor efficiency : Under rated operating conditions, what is the motor efficiency? A three phase transformer (made out of three identical single phase transformers) converts a 1200 VAC delta system (primary) to a 13,200 VAC Y system (secondary). Find the turns ratio of..
Inappropriate activation of the immune system : Mother Nature uses a "fail-safe system" to prevent inappropriate activation of the immune system. Provide several examples of this strategy.
Compute and interpret the mean of the random variable : A Wendy's manager performed a study to determine a probability distribution for the number of people, X, waiting in line during lunch. The results were as follows: (a) Verify that this is a discrete probability distribution. (b) Compute and interpr..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Differentiate between classification of data and clustering

Give two examples, apart from those given in the slides, for each of the following: a) Data mining from the commercial viewpoint b) Data mining from the scientific viewpoint. Differentiate between classification of data and clustering of data with th..

  Write a program that creates two vectors from x-one

write a program that creates two vectors from x-one (call it P) that contains the positive elements of x, and a second (call it N) that contains the negative elements of x. In both P and N, the elements are in the same order as in x.

  Explain how risc-pipelining evolved over past years

Explain how concepts such as RISC, pipelining, cache memory, and virtual memory have evolved over the past twenty-five years to improve system performance.

  What specific data about the entities will need to be stored

The system will need to record data about what entities? What specific data about the entities will need to be stored?

  Which kinds of computing and information systems

For which kinds of computing and information systems do users really need to care about underlying technologies -- which is what an operating system is? Which kinds of users ought to pay more attention to how well a variety of devices and application..

  The payroll manager for your employer

You are the Payroll Manager for your employer. Your payroll clerk has submitted the worksheet displayed here. All employees earn their regular pay rate times the hours worked plus an overtime bonus of 50% of the hours worked in excess of 40 hou..

  Explain the characteristics of human-centered design methods

Explain the characteristics of human-centered design methods

  The heating element of a water heater in an apartment

The heating element of a water heater in an apartment building has a maximum power output of 28 kW. Four residents of the building

  How integer variables are typically represented on computer

Briefly describe how integer variables are typically represented on a computer. (Look up one's complement and two's complement arithmetic in an introductory computer science textbook if you are not familiar with these.)

  Riordan manufacturing

A full description of the new system, a description of its components, and the benefit it will provide to Riordan Manufacturing (Virtual Organization)

  Identify the components of data model

Identify the components of data model: Define the entities, primary keys, and relationships that are used to define the data model for your project.

  Explain the process of forward chaining

Explain the process of forward chaining

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