Calculate the record size r in bytes

Assignment Help Basic Computer Science
Reference no: EM131053839

Consider a disk with block size B = 512 bytes. A block pointer is P = 6 bytes long, and a record pointer is PR = 7 bytes long. A file has r = 30,000 EMPLOYEE records of fixed length. Each record has the following fields: Name (30 bytes), Ssn (9 bytes), Department_code (9 bytes), Address (40 bytes), Phone (10 bytes), Birth_date (8 bytes), Sex (1 byte), Job_code (4 bytes), and Salary (4 bytes, real number). An additional byte is used as a deletion marker.

a. Calculate the record size R in bytes.

b. Calculate the blocking factor bfr and the number of file blocksb, assuming an unspanned organization.

c. Suppose that the file is ordered by the key field Ssn and we want to construct a primary index on Ssn. Calculate (i) the index

blocking factor bfri (which is also the index fan-out fo); (ii) the number of first-level index entries and the number of first-level index blocks; (iii) the number of levels needed if we make it into a multilevel index; (iv) the total number of blocks required by the multilevel index; and (v) the number of block accesses needed to search for and retrieve a record from the file-given its Ssn value-using the primary index.

d. Suppose that the file is not ordered by the key field Ssn and we want to construct a secondary index on Ssn. Repeat the previous exercise (part c) for the secondary index and compare with the primary index.

e. Suppose that the file is not ordered by the non key field Department_code and we want to construct a secondary index on Department_code, using option 3 of Section 18.1.3, with an extra level of indirection that stores record pointers. Assume there are 1,000 distinct values of Department_code and that the EMPLOYEE records are evenly distributed among these values. Calculate (i) the index blocking factor bfri (which is also the index fan-out fo); (ii) the number of blocks needed by the level of indirection that stores record pointers; (iii) the number of first-level index entries and the number of first-level index blocks; (iv) the number of levels needed if we make it into a multilevel index; (v) the total number of blocks required by the multilevel index and the blocks used in the extra level of indirection; and (vi) the approximate number of block accesses needed to search for and retrieve all records in the file that have a specific Department_code value, using the index.

f. Suppose that the file is ordered by the nonkey field Department_code and we want to construct a clustering index on Department_code that uses block anchors (every new value of Department_code starts at the beginning of a new block). Assume there are 1,000 distinct values of Department_code and that the EMPLOYEE records are evenly distributed among these values. Calculate (i) the index blocking factor bfri (which is also the index fan-out fo); (ii) the number of first-level index entries and the number of first-level index blocks; (iii) the number of levels needed if we make it into a multilevel index; (iv) the total number of blocks required by the multilevel index; and (v) the number of block accesses needed to search for and retrieve all records in the file that have a specific Department_code value, using the clustering index (assume that multiple blocks in a cluster are contiguous).

g. Suppose that the file is not ordered by the key field Ssn and we want to construct a B+-tree access structure (index) on Ssn. Calculate (i) the orders p and Pleaf of the B+-tree; (ii) the number of leaf-level blocks needed if blocks are approximately 69 percent full (rounded up for convenience); (iii) the number of levels needed if internal nodes are also 69 percent full (rounded up for convenience); (iv) the total number of blocks required by the B+-tree; and (v) the number of block accesses needed to search for and retrieve a record from the file-given its Ssn value-using the B+-tree.

h. Repeat part g, but for a B-tree rather than for a B+-tree. Compare your results for the B-tree and for the B+-tree.

Reference no: EM131053839

Questions Cloud

Trends for managerial decision making in copper industry : Using data sources from business publications and the Internet, discuss significant trends in both demand and supply in the copper industry that have influenced the price of copper since September 2011. What are the implications of these trends fo..
Brief description of the case study in the documentary : A brief description of the case study in the documentary, including a description of the individual and the forensic population he is from. A description of the potential role(s) of a forensic psychology professional in relation to the case study.
How the tree will shrink and show the final tree : how the tree will shrink and show the final tree.
Average variable cost is increasing or decreasing : Assume the marginal cost of production is greater than the average variable cost. Can you determine whether the average variable cost is increasing or decreasing?  Explain.
Calculate the record size r in bytes : Calculate the record size R in bytes.
Competitive market price competition : Non-price competition in a monopolistic market Non-price competition in a purely competitive market Price competition in a monopolistically competitive market Price competition in a purely competitive market
Discuss the different algorithms for implementing : Discuss the different algorithms for implementing
Relationship between learning something and remembering it : How would you define the relationship between learning something and remembering it? What specific region of Clive's brain is damaged to result in this memory loss?
Consumers benefit from the market integration : Suppose Home has annual DVD player sales (S) of 50,000 units. Suppose all of these parameters are the same for all firms in the industry. In the absence of trade, how many firms will produce DVD players? What will be the equilibrium price of a DVD..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain how versatility of excel affect application support

How does versatility of Excel affect application support? As its versatility, what assumptions should be made when diagnosing and troubleshooting Excel-based problems?

  Suggest at least five (5) expected business benefits

Suggest at least five (5) expected business benefits that Especially for You Jewelers company might derive from a new system. Provide a rationale for your suggestions. Propose at least five (5) system capabilities for the company. Provide a rationale..

  Increasing the number of cpus in a computer system tends to

increasing the number of cpus in a computer system tends to increase system performance. there are different types of

  What does power consumption have to do with the fact

What does power consumption have to do with the fact that most modern processors have multiple cores - Which of the given statements about how modern computers are built is/are true?

  Explain synthesise legal and ethical issues

It should be free from spelling and grammatical errors. You must also include Reference List (APA style) of all of the reference sources that you used. Your assignment MUST be...

  Research the simple computer games snake and tron

Research the simple computer games "Snake" and "Tron."

  Describe factors having greater trust in e-business

Describe the factors which would contribute to you having greater trust in e-business. Do you look for trust seals when shopping online?

  Result of the calculation to be truncated

Assuming that variables value1 and value2 are both declared as ints, which of the following statements causes the result of the calculation to be truncated?

  Navigation bar is fully functional and connects all pages

Update your website that you started in Week 2 to at least 3 complete webpages, with extra placeholder pages as needed. Include multimedia (e.g. images, audio, video) appropriate to the site. Use CSS to control the look of the site. Make sure your..

  Write a program that reads in an integer

Write a program that reads in an integer, and breaks it into a sequence of individual digits. For example, the input 16384 is displayed as 1 6 3 8 4 You may assume that the input has no more than five digits and is not negative

  Names and numbers of london-based suppliers

Give the relational algebra expression for the following English queries. 1. Get the supplier# who supply all the blue parts

  Scripts to automate user and group maintenance

Need assistance and examples to start a report based upon the following information generated from any UNIX like interface, preferably Ubuntu or Cygwin. Need UNIX scripts for the following actions: (1) A script to automate the shutdown process and a ..

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