100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 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








Whoops! We can’t load your doc right now. Try again or contact support.

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

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.

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
566
Member since
2 year
Number of followers
343
Documents
1497
Last sold
2 weeks ago

4.3

67 reviews

5
40
4
11
3
12
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 exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

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

Student with book image

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

Alisha Student

Frequently asked questions