Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 438 Weeks Ago, 1 Day Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Engineering Posted 25 May 2017 My Price 15.00

Would your answer change if only five buffer pages were available?

Consider the join of R and S described in Exercise 12.4.

1. With 52 buffer pages, if unclustered B+ indexes existed on R.a and S.b, would either provide a cheaper alternative for performing the join (using an index nested loops join) than a block nested loops join? Explain.

(a) Would your answer change if only five buffer pages were available?

(b) Would your answer change if S contained only 10 tuples instead of 2,000 tuples?

2. With 52 buffer pages, if clustered B+ indexes existed on R.a and S.b, would either provide a cheaper alternative for performing the join (using the index nested loops algorithm) than a block nested loops join? Explain

(a) Would your answer change if only five buffer pages were available?

(b) Would your answer change if S contained only 10 tuples instead of 2,000 tuples?

3. If only 15 buffers were available, what would be the cost of a sort-merge join? What would be the cost of a hash join?

4. If the size of S were increased to also be 10,000 tuples, but only 15 buffer pages were available, what would be the cost of a sort-merge join? What would be the cost of a hash join?

5. If the size of S were increased to also be 10,000 tuples, and 52 buffer pages were available, what would be the cost of sort-merge join? What would be the cost of hash join?

Exercise 12.4

Consider the join , given the following information about the relations to be joined. The cost metric is the number of page I/Os unless otherwise noted, and the cost of writing out the result should be uniformly ignored.

Relation R contains 10,000 tuples and has 10 tuples per page.

Relation S contains 2,000 tuples and also has 10 tuples per page.

Attribute b of relation S is the primary key for S.

Both relations are stored as simple heap files.

Neither relation has any indexes built on it.

52 buffer pages are available.

1. What is the cost of joining R and S using a page-oriented simple nested loops join? What is the minimum number of buffer pages required for this cost to remain unchanged?

2. What is the cost of joining R and S using a block nested loops join? What is the minimum number of buffer pages required for this cost to remain unchanged?

3. What is the cost of joining R and S using a sort-merge join? What is the minimum number of buffer pages required for this cost to remain unchanged?

4. What is the cost of joining R and S using a hash join? What is the minimum number of buffer pages required for this cost to remain unchanged?

5. What would be the lowest possible I/O cost for joining R and S using any join algorithm, and how much buffer space would be needed to achieve this cost? Explain briefly.

6. How many tuples will the join of R and S produce, at most, and how many pages would be required to store the result of the join back on disk?

7. Would your answers to any of the previous questions in this exercise change if you are told that R.a is a foreign key that refers to S.b?

 

Answers

(8)
Status NEW Posted 25 May 2017 08:05 AM My Price 15.00

-----------

Attachments

file 1495701234-Answer.docx preview (731 words )
C-----------ons-----------ide-----------r t-----------he -----------joi-----------n o-----------f R----------- an-----------d S----------- de-----------scr-----------ibe-----------d i-----------n E-----------xer-----------cis-----------e 1-----------2.4-----------. -----------1. -----------Wit-----------h 5-----------2 b-----------uff-----------er -----------pag-----------es,----------- if----------- un-----------clu-----------ste-----------red----------- B+----------- in-----------dex-----------es -----------exi-----------ste-----------d o-----------n R-----------.a -----------and----------- S.-----------b, -----------wou-----------ld -----------eit-----------her----------- pr-----------ovi-----------de -----------a c-----------hea-----------per----------- al-----------ter-----------nat-----------ive----------- fo-----------r p-----------erf-----------orm-----------ing----------- th-----------e j-----------oin----------- (u-----------sin-----------g a-----------n i-----------nde-----------x n-----------est-----------ed -----------loo-----------ps -----------joi-----------n) -----------tha-----------n a----------- bl-----------ock----------- ne-----------ste-----------d l-----------oop-----------s j-----------oin-----------? E-----------xpl-----------ain-----------. -----------(a)----------- Wo-----------uld----------- yo-----------ur -----------ans-----------wer----------- ch-----------ang-----------e i-----------f o-----------nly----------- fi-----------ve -----------buf-----------fer----------- pa-----------ges----------- we-----------re -----------ava-----------ila-----------ble-----------? -----------(b)----------- Wo-----------uld----------- yo-----------ur -----------ans-----------wer----------- ch-----------ang-----------e i-----------f S----------- co-----------nta-----------ine-----------d o-----------nly----------- 10----------- tu-----------ple-----------s i-----------nst-----------ead----------- of----------- 2,-----------000----------- tu-----------ple-----------s?
Not Rated(0)