Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Expert Solution & Answer
Book Icon
Chapter 15, Problem 3PE

Explanation of Solution

a.

Nested loop join:

The “r1” needs 800 blocks, and “r2” needs 1500 blocks.

Let assume “M” pages of memory. If “M” is greater than 800, the join can easily be done in 1500 + 800 disk accesses, using even plain nested-loop join.

So we consider only the case where “M” less than or equal to 800 pages.

Using “r1” as the outer relation the user need 20000 * 1500 + 800

20000 *

Explanation of Solution

b.

Block nested loop join:

If, “r2” is the outer relation the user need,[800M - 1] * 1500 + 800 disk accesses,

Explanation of Solution

c.

Merge join:

Let assuming that “r1” and “r2” are not initially sorted on the join key, the total sorting cost inclusive of the output is:

Bs= 1500 (2[logM1(1500M)]+2)+

Explanation of Solution

d.

Hash join:

Let assume no overflow occurs. Since, “r1” is smaller, the user uses it as the build relation and “r2” as the probe relation...

Blurred answer
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education