What is the cost of joining r and s using a hash join

Assignment Help Basic Computer Science
Reference no: EM131210509

Consider the join ,

2409_4b851fd4-9342-4fb6-b6ba-cc41512f73f2.png

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?

Reference no: EM131210509

Questions Cloud

Research paper about the internet of things : I need a research paper about the Internet of things. I was given a task to select particular context about internet of things and apply to a company or a school campus
Prepare a security standard document : Prepare a security standard document that meets the requirements of Yummy Good Treats in a clear, concise manner. While writing the document, keep in mind the business needs of the organization and the target audience for your writing.
Information and conclusion about the questions : What exchange rate system did Argentina adopt before 2002? Why? What factors contributed to the Argentina currency crisis? Write more information and conclusion about the questions.
Prepare a presentation that includes information from video : Develop a presentation that includes information from the video on ways to address anxiety-reducing techniques and improve overall presentation delivery.
What is the cost of joining r and s using a hash join : 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?
Main causes for the deficits : US has experienced continuous current account deficits since the early 1980s. What do you think are the main causes for the deficits? What would be the consequences of continuous U.S current account deficits?
Write code to create the generator : Write code to create the generator. Submit your source code as well as a description of how I could run the program, sample screenshots of the program in action, and the various changes that could be produced through your polymorphism in the progr..
What types of documentation are needed for the application : What types of documentation are needed for this application? During application development, the IT staff will develop a structure chart. What steps should they follow?
What is stockholders equity : A company has $200,000 in inventory, which represents 20 percent of current assets. Current assets represent 50 percent of total assets. Total debt represents 30 percent of total assets. What is stockholders' equity?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Discuss the ethical issues raised by the experiment

Would your reactions to this study be different if the participants had played with an infant and then later been told that the infant had died?

  What is the black stack

Read this article http://www.e-flux.com/journal/the-black-stack Write 500 words minimum for each prompt below. Keep your copy Ratios below 30%.  What is the "Black Stack"? Discuss

  Discuss how the business requirements drove

Discuss how the business requirements drove the system's initial development. Describe the type and basic uses of the system, how the system has helped the organization, and any likely future development plans.

  Compare the hardware of the two devices

Compare their user interfaces and discuss major advantages and/or disadvantages of one over the other.

  What needs to be protected and from what to protect it

In order to successfully manage risk, one must understand risk itself and the assets at risks. The way one goes about managing risk will depend on what needs to be protected, and from what to protect it.

  Did the tool recover the deleted files

Did the tool recover the deleted files? How does data recovery differ from computer forensics

  Function whose job is to input

Write a function whose job is to input #'s, non-# to quit, recover from the input failure by calling recover(), and tell main some statistics about the numbers read. A. unsigned readA();

  Write a declaration for an enumerated data type

A pet store sells dogs, cats, birds, and hamsters. Write a declaration for an enumerated data type that can represent the types of pets the store sells.

  In mips assembly language

In MIPS Assembly language

  Describe an algorithm of the ford-fulkerson type

If the supplies si and the arc flow bounds bij and cij are integer, your algorithm should be guaranteed to find an integer feasible solution (assuming at least one feasible solution exists). Hint: Use the conversion to a max-flow problem of Fig. 3..

  N-processor common crcw pram algorithm

Input is an array of n elements. give an O(1) time, n-processor common CRCW PRAM algorithm to check whether the array is in sorted order.

  Premier products-create an inventory report

Write the SQL to retrieve a list of all customers that live in Texas (TX). Include the customer's first and last name, their account number and their representative's name and number. Using the tables in Premier Products, create an inventory repor..

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