Consider a situation where external sort-merge is applied to relation S in Problem 1. Assuming that up to 107 disk blocks can be loaded into the main memory, answer each of the following questions: (a) Explain how many initial runs will be created. Also, describe how many block transfers and disk seeks will be needed to create all of these initial runs. (b) After the initial runs are created as explained above, external sort-merge repeatedly merges a number of runs into a bigger run until it obtains one final run. Assume that each merge pass uses three input buffers and one output buffer to merge each group of three runs into a larger run. Explain how many merge passes are needed to obtain one final run. Also, calculate the total number of block transfers and disk seeks during these merge passes. Justify your answer. Assume that (i) the input and output buffers are of the same size, (ii) the input and output buffers fully use the main memory into which up to 107 disk blocks can be loaded, and (iii) the final run is not written back to disk because it is consumed immediately by an operator while it is being generated. (c) Consider the merge passes described in (b). If each merge pass uses 9 input buffers and 1 output buffer, how many block transfers and disk seeks are necessary to obtain one final run? Also, explain whether it is more advantageous to use 3 input buffers as in (b) or 9 input buffers. Justify your answer by estimating the overall time for merging all runs into one final run. For this estimation, assume that each block transfer takes 0.1 milliseconds and each disk seek takes 10 milliseconds.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Consider a situation where external sort-merge is applied to relation S in Problem 1. Assuming that up to 107 disk blocks can be loaded into the main memory, answer each of the following questions:


(a) Explain how many initial runs will be created. Also, describe how many block transfers and disk seeks will be needed to create all of these initial runs.


(b) After the initial runs are created as explained above, external sort-merge repeatedly merges a number of runs into a bigger run until it obtains one final run. Assume that each merge pass uses three input buffers and one output buffer to merge each group of three runs into a larger run. Explain how many merge passes are needed to obtain one final run. Also, calculate the total number of block transfers and disk seeks during these merge passes. Justify your answer. Assume that (i) the input and output buffers are of the same size, (ii) the input and output buffers fully use the main memory into which up to 107 disk blocks can be loaded, and (iii) the final run is not written back to disk because it is consumed immediately by an operator while it is being generated.


(c) Consider the merge passes described in (b). If each merge pass uses 9 input buffers and 1 output buffer, how many block transfers and disk seeks are necessary to obtain one final run? Also, explain whether it is more advantageous to use 3 input buffers as in (b) or 9 input buffers. Justify your answer by estimating the overall time for merging all runs into one final run. For this estimation, assume that each block transfer takes 0.1 milliseconds and each disk seek takes 10 milliseconds. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

The numbers 107 and 106 being mentioned in parts a and b, do you mean 107 and 106? Please fix all the answers in all parts and make sure to give a correct response for each part!!!!!

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education