hw3 - Merge-Sort. What is the minimum size of the main...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE671 - Introduction to DB Systems II Homework 3 Due on in class, Feb. 11, 2008 Problem 1 : B+-tree (50 points) Implement the insertion functionality for a B+ tree of order 2 (i.e,. n=2) with one of the following three programming languages: C++, C , Java. You may assume that all the keys of the inserted record are integers. You may ignore the record links in the leaf nodes. You should submit your source codes and a README file that describes how to compile and use your program with the following command: submit c671aa lab1 hw2.tar.gz README Note that all of the files must be submitted using one command. Please also include the test cases that you have used to test your program in the README file. Problem 2 : Merge-Sort (20 points) Suppose we have a relation with 16,665 tuples and each tuple requires 15 byes. We have a machine whose main memory and disk-block size (100 bytes) are sufficient to sort the 16,665 tuples using Two-Phase Multiway
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Merge-Sort. What is the minimum size of the main memory? Problem 3 : Query Optimization (30 points) The query processor is about to decide how to execute the following query on relations R(A,B) and S(B,C): SELECT * FROM R,S WHERE R.B=S.B AND S.B = 10 The following two plans are being considered: Plan 1 Plan 2 (1.2) (2.3) (1.1) (2.1) (2.2) " R . B = 10 S R . B = 10 S . B = 10 R R S Relation R has 60,000 tuples with 10 tuples per disk block and V(R,B)=12. Similarly, S has 30,000 tuples with 30 tuples per disk block and V(S,B)=5. Consider a model that estimates the cost of a query plan through the total number of intermediate and final tuples produced by the operators. (1) What are the sizes (number of tuples) of the intermediate results and final results under each plan? (2) What are the corresponding costs of plans 1 and 2? Which is the better plan?...
View Full Document

This note was uploaded on 04/13/2010 for the course CSE 671 taught by Professor Hakanferhatosmanoglu during the Winter '06 term at Ohio State.

Page1 / 2

hw3 - Merge-Sort. What is the minimum size of the main...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online