What will be the total i/o cost for sorting this file

Assignment Help Basic Computer Science
Reference no: EM131210923

Suppose that you just finished inserting several records into a heap file, and now you want to sort those records. Assume that the DBMS uses external sort and makes efficient use of the available buffer space when it sorts a file. Here is some potentially useful information about the newly loaded file and the DBMS software that is available to operate on it:
The number of records in the file is 4,500. The sort key for the file is four bytes long. You can assume that rids are eight bytes long and page ids are four bytes long. Each record is a total of 48 bytes long. The page size is 512 bytes. Each page has 12 bytes of control information on it. Four buffer pages are available.

1. How many sorted subfiles will there be after the initial pass of the sort, and how long will each subfile be?

2. How many passes (including the initial pass considered above) will be required to sort this file?

3. What will be the total I/O cost for sorting this file?

4. What is the largest file, in terms of the number of records, that you can sort with just four buffer pages in two passes? How would your answer change if you had 257 buffer pages?

5. Suppose that you have a B+ tree index with the search key being the same as the desired sort key. Find the cost of using the index to retrieve the records in sorted order for each of the following cases:

? The index uses Alternative (1) for data entries.

? The index uses Alternative (2) and is not clustered. (You can compute the worstcase cost in this case.)

? How would the costs of using the index change if the file is the largest that you can sort in two passes of external sort with 257 buffer pages? Give your answer for both clustered and unclustered indexes.

Reference no: EM131210923

Questions Cloud

System performance in queuing analysis : What are the most common measurements of system performance in queuing analysis?
How many passes will it take to sort the file completely : How many buffer pages do you need to sort the file completely in just two passes?
Determining the confidence interval : A research firm conducted a survey to determine the mean amount steady smokers spend on cigarettes during a week.  A sample of 64 smokers revealed that = $20 and S = $5.  What is the 95% confidence interval for μ?
What are the components of quality : What 3 ways can you create quality within the healthcare organization for the patient? Who are your customers and what does it take to satisfy the customer? What are the customers service expectations and how do they vary between the different types ..
What will be the total i/o cost for sorting this file : What is the largest file, in terms of the number of records, that you can sort with just four buffer pages in two passes? How would your answer change if you had 257 buffer pages?
How would the bank benefit from transfer of credit risk : How would you measure credit risk at the bank? Be sure to discuss techniques for measuring individual credit products and commercial credit products. How would the bank benefit from transfer of credit risk?
Show puglias economy using a graph : Show Puglia's economy, using a graph with a production-possibility curve and community indifference curves.- Which product will Puglia export?
Positive skewed normal distribution : What are the key components needed to determine if you have a positive skewed normal distribution?
Explain your position on the statement : Discuss any potential legal or ethical issues that might be encountered if this type of policy is implemented. Based on your position, what issues might you run into in your meeting?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Understanding of wealth maximization

Does having excess amounts of cash means that the firm has maximized wealthy? Discuss the above statements in light of your understanding of wealth maximization.

  Design modular program asks how many tickets each class

There are three seating categories at a stadium

  Design a program that will read a file of product records

Design a program that will read a file of product records, each containing the item number, the item name, and the quantity sold this year and the quantity sold last year. The program is to produce a product list showing the item number, the item nam..

  Class about effective communication

In the last portion of the paper you will provide advice to one or more of the characters in the movie about their communication. Use what you've learned in class about effective communication, and help one or more of the characters get better.

  Difference between bounded and unbounded media

Explain the difference between bounded and unbounded media, and provide examples of each that are commonly found in homes, schools, or area businesses.

  Convert the floating point number to ieee

Convert the floating point number to IEEE Single Precision Floating-Point Representation and For the following 8-bit data, using 2's complement to conduct the following calculation

  Who developed the ibm pc

What is the code name for the 12 engineers who developed the IBM PC and In which year did Amazon.com report that for the first time sales of e-books exceeded the sales of hardcover books?

  Display the total annual pay on the screen

Display the total annual pay on the screen.

  What is the code to remove the space at the end of string

What is the code to remove the space at the end of the string below and return the result in a textbox? Dim d As String = "CSC 232 " 2. What is the code to display just the text "232" from the string "CSC 232" in a textbox?

  Determine the smallest force p the boy must push on stack

The coefficient of static friction at A and B is µs = 0.3 . The tables are locked together.

  Design an algorithm using pseudocode representation

Design an algorithm using pseudocode representation that will prompt a terminal operator for three characters, except those characters as input, sort them into ascending sequence and output them to the screen.

  Class stubs and implemenatation for the following program

Need a OOP Unit Tests, Class stubs and Implemenatation for the following program using this SDD. This should be created in ArgoUML using JAVA

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