Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

HW4 Solution University of Michigan EECS 484

Rating
-
Sold
1
Pages
3
Grade
A+
Uploaded on
30-03-2023
Written in
2022/2023

Question 1 (20 points) 1.1) (6 points) Block Nested Loops Join (A) Reads = |R| + |S| * ceil(|R|/(B-2)) = 5,000 + 15,000 * ceil(5,000/(800-2)) = 110,000 (B) Writes = 0 (no writes are required for nested loops joins) 1.2) (7 points) Grace Hash Join (A) Reads in Partition phase = |R| + |S| = 20,000 Reads in Probe phase = |R| + |S| = 20,000 Total reads = 2 * (|R| + |S|) = 40,000 (B) Total writes = |R| + |S| = 20,000 1.3) (7 points) BNJ = 110,000 * 1 [reads; no writes] = 110,000 GHJ = 40,000 * 1 [reads] + 20,000 * X [writes] From BNJ = GHJ → 110,000 = 40,000 + 20,000 * 3.5, we get X = 3.5 So we should choose BNJ if X 3.5, but GHJ if X 3.5 Question 2 (20 points) 2.1) (4 points) B - 1 buckets 2.2) (4 points) Recursively apply hash-based projection technique to further split the buckets with different hash functions until no more partition overflow. 2.3) (4 points) (B - 1)^2 buckets 2.4) (4 points) Accelerate the record matching in memory or reduce CPU cost of record matching. 2.5) (4 points) No. In the probing phase, using the same hash function will assign each data record into the same bucket. No speeding up for join in the probing phase is obtained by using the same hash function.

Show more Read less
Institution
Course

Content preview

Question 1​ (20 points)

1.1) (6 points)
Block Nested Loops Join
(A) Reads = |R| + |S| * ceil(|R|/(B-2)) = 5,000 + 15,000 * ceil(5,000/(800-2)) = 110,000
(B) Writes = 0 (no writes are required for nested loops joins)

1.2) (7 points)
Grace Hash Join
(A) Reads in Partition phase = |R| + |S| = 20,000
Reads in Probe phase = |R| + |S| = 20,000
Total reads = 2 * (|R| + |S|) = 40,000
(B) Total writes = |R| + |S| = 20,000

1.3) (7 points)
BNJ = 110,000 * 1 [reads; no writes] = 110,000
GHJ = 40,000 * 1 [reads] + 20,000 * X [writes]
From BNJ = GHJ → 110,000 = 40,000 + 20,000 * 3.5,
we get X = 3.5
So we should choose BNJ if X > 3.5, but GHJ if X < 3.5

Question 2​ (20 points)

2.1) (4 points) B - 1 buckets

2.2) (4 points) Recursively apply hash-based projection technique to further split the buckets with
different hash functions until no more partition overflow.

2.3) (4 points) (B - 1)^2 buckets

2.4) (4 points) Accelerate the record matching in memory or reduce CPU cost of record matching.

2.5) (4 points) No. In the probing phase, using the same hash function will assign each data record into
the same bucket. No speeding up for join in the probing phase is obtained by using the same hash
function.

Written for

Course

Document information

Uploaded on
March 30, 2023
Number of pages
3
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ExamsConnoisseur Self
Follow You need to be logged in order to follow users or courses
Sold
587
Member since
3 year
Number of followers
344
Documents
1492
Last sold
2 weeks ago

4.2

68 reviews

5
40
4
11
3
13
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions