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

  Polynomial-time algorithm to test dependency-preservation

Projecting the FDs stated over a set of attributes X onto a subset of attributes Y requires that we consider the closure of the FDs. Give an example where considering the closure is important in testing dependency-preservation; that is, considerin..

  How many hits does the sequence exhibit

Assume LRU replacement policy, for each sequence, how many hits does the sequence exhibit?

  Whether the byte in question is low order or high order

Give an algorithm to compute the revised checksum without rescanning the entire buffer. Your algorithm should consider whether the byte in question is low order or high order.

  Give a big-oh characteristics in terms of n

Give a big-Oh characteristics in terms of n, of the running time of the loop method for 1) Algorithm loop2(n):

  Role of technology in the workplace

Consider the role of technology in the workplace today and take a stance on whether or not you believe a company has the right to monitor technology usage of its employees on a constant basis. Give your opinion on whether such limitation could (a)..

  Create a header with the travel the world text

Create a header (Insert > Header) with the following text: Travel the World, Get Advice Here. Left-justify this text in the header, make it bold, and change its font size to between 14-16 points.

  What complete binary tree does the following array represent

What complete binary tree does the following array represent?

  What is triple encryption

What is triple encryption? Why is the middle portion of 3DES a decryption rather than an encryption?

  What competitive advantage does technology give to business

What competitive advantage does technology give to business? How does aging hardware affect this advantage? What is the importance of organizational decision roles to technology innovation

  Which operation following expression will be performed first

Which operation in the following expression will be performed first? c = a++ / b + 5;

  Create the primary key and foreign keys using a uml

Faculty groups are divided by core competencies that the university offers. For example, there are groups such as the Art Faculty, Computer Technology Faculty, Language Faculty, and Science Faculty. Each faculty member has an assigned Dean and is ..

  Mobile technologies and commerce

Mobile Technologies and Commerce

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