Propose an algorithm for finding an intersection of two large relations (i.e., ones that do not fit in main memory) using hashing.
What will be an ideal response?
Solution:
Hash each relation on all attributes using the same hash function. Keep the distinction between the two parts of the bucket, which came from different relations. Tuples that fall into the intersection must fall into the same bucket. If the bucket is small enough, do the intersection in main memory. Else hash the tuples in the bucket again using a different hash function. It is reasonable to expect that the second-level buckets will fit into the main memory and then intersection within each bucket can be done in main memory.
You might also like to view...
________ viruses are often transmitted by a flash drive left in a USB port
A) Logic bomb B) Macro C) Boot-sector D) Time bomb
The middle star in the accompanying figure has a point size of ____.
A. 0 B. 0.5 C. 1 D. 5
Explain why users prefer online documentation. Why is it an important tool?
What will be an ideal response?
____________ refers to business transactions that are conducted electronically over a computer network.
Fill in the blank(s) with the appropriate word(s).