What is the cost of joining r and s using a sort-merge join

Assignment Help Database Management System
Reference no: EM13336571

Consider the join R R.a = S.bS , 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 2000 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 does the join of R and S produce, at most, and how many pages are 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 were told that R.a is a foreign key that refers to S.b?

 

Reference no: EM13336571

Questions Cloud

How many revolutions does the drum make during the fall : You are the technical consultant for an action-adventure film in which a stunt calls for the hero to drop off a 23.7-m tall building and land on the ground safely at a final vertical speed of 3.85 m/s. How many revolutions does the drum make during..
Compiler design problem : This is done by changing the CFG that the language uses and what changes would have to be made to ac's CFG
Identify a relational algebra tree : Identify a relational algebra tree (or a relational algebra expression if you prefer) that reflects the order of operations a decent query optimizer would choose.
Compute the magnitude of the magnetic flux through the loop : A solenoid with 1200 turns per meter has a diameter of 9.00 cm. A current I = 2.57 A flows in the clockwise direction, Find the magnitude of the magnetic flux through the loop
What is the cost of joining r and s using a sort-merge join : 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?
What is the total i/o cost for sorting this file : How many sorted subfiles will there be after the initial pass of the sort, and how long will each subfile be?
What is the carts final velocity : A 100 N force has a horizontal component of 60 N and a vertical component of 80 N. What is the cart's final velocity
Calculate the pressure of the gas on the walls : One mole of oxygen molecules occupies a cubic vessel of side length 10 cm at a temperature of 18 C. Calculate the pressure of the gas on the walls
List whether the index matches the given selection condition : Athabasca University has about 32,000 students between the ages of 17 to 60. Consider the AU student relation with the following schema.

Reviews

Write a Review

Database Management System Questions & Answers

  Describing the select statement

Data processing needs taking or receiving the data from a source and doing something with it. The same can be said about the transaction processing. When working along with a file, whether it be a fixed length.

  Case study-zen chiropractic clinic

Display the full details for the cheapestservices provided by ZC2 -  The Case Study-Zen Chiropractic Clinic

  Prepare table which is in first normal form

Prepare the example of table which is in first normal form but not in second normal form and example of a table which is in second normal form but not in third normal form.

  Diagram and determine the possible iterative steps

Determine the steps in the development of an effective Entity Relationship Model (ERM) Diagram and determine the possible iterative steps / factors that one must consider in this process with consideration of the HR core functions and responsibili..

  Use three-sphere model for systems management

Use the three-sphere model for systems management and brainstorm issues related to the change based on the business, technology, and organization spheres.

  Build the physical model

She's come to you for questions regarding connectivity to the Oracle database, which method would you advise her to use to connect to the Oracle database?

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Define calculations and format the table

internship at Mountain View Realty, a real estate firm that focuses in the North Utah County area. The previous intern developed a spreadsheet listing houses listed and sold during the last several months. She included addresses, location, list pr..

  Design diagram data warehouse using star schema

Assume that data warehouse consists of three dimensions time, customer, and cell phone plan, and two measures number of calls and cell phone bill. Sketch a schema diagram for above data warehouse using star schema.

  List all pair of products names which are in same city

List the names of agents that placed an order for customer C003 or customer C006. List all pair of products names that are in the same city, along with their city name.

  Explaining business activity in new is with a database

Assume you manage business activity which needs a new IS with a database. The development team is divided on which DBMS you must use. One faction wishes to use oracle,a second wants to use MtSQL, and a third wants to use SQL server.

  Selecting opies of book titled the big magic

How many copies of the book titled „The big magic? are owned by the local library whose name is "Newtown" library?

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