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

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern