Design a join algorithm that uses a join index. De?ne the notion of a clustered join index (there are three possibilities in the case of a binary join!) and consider the e?ect of clustering on the join algorithm.
What will be an ideal response?
The actual join algorithm was described in Section 9.7.2. Here we only need to consider clustering and its e?ect on the algorithm.
We can possibly say that a join index, J, for r s is clustered in either of the three cases:
1. When J is sorted on the r-part, i.e., the r-side rids in J are organized in the same order as their corresponding tuples in r
2. When J is sorted on the s-part
3. When J is sorted simultaneously on both parts, i.e., the r-side rids in J are organized in the order of their corresponding tuples in r and the s-side rids are organized in the order of the corresponding tuples in s.
Note that we can always achieve options (1) and (2) by simply sorting J on its r-side or s-side. In fact, it would be silly not to do so. For this reason, only the third possibility can be reasonably considered to deserve the name “clustered” join index. In the ?rst two cases, the join algorithm was described in Section 9.7.2. In the third case, the algorithm is reminiscent of the merge stage of the sort-merge join. We simply scan the join index and retrieve the pages of r and s that correspond to the matching tuples. Once the pages are in, we output the requisite joined tuples. Since the tuples in the index are organized in the same order as the tuples of both r and s, the join is computed in less than one scan of these relations. It takes less than one scan because only the pages that contain the tuples to be joined need to be retrieved (we know which pages these are because the join index gives us the exact rids).
You might also like to view...
When your computer's hard drive malfunctions, you will need a(n) ____ to get your computer started and access the tools necessary to start the restore process.
A. system recovery drive B. system maintenance disc C. operating system CD D. restore repair disc
Which of the following are valid subnet IDs for network 172.16.0.0, assuming mask 255.255.224.0 is used throughout network 172.16.0.0?
A) 172.16.1.16 B) 172.16.0.0 C) 172.16.240.0 D) 172.16.160.0 E) 172.16.248.0
If you change the color or title of a ____ page, all the pages in the site will reflect that same color and title.
A. master B. default C. key D. super
Identify the letter of the choice that best matches the phrase or definition.
A. Field can store a variable amount of text or combinations of text and numbers where the total number of characters may exceed 255. B. Presents information about the database object, the progress of current tasks, and the status of certain commands and keys. C. Field can contain any characters and the total numbers of characters cannot exceed 255. D. Field can contain only monetary data. E. Field can store a unique sequential number that Access assigns to the record. F. A commonly accepted shorthand representation for showing the structure of a relational database. G. View that shows a report as it will appear when printed. H. View that shows a report on the screen and allows changes to the report. I. View that shows a report on the screen and does not allow changes to the report. J. Can include such information as the file's author, title, or subject.