Question: Consider a relation R(a, b, c, d) containing 1 million records, where each page of the relation holds 10 records. R is organized as a

Consider a relation R(a, b, c, d) containing 1 million records, where each page of the relation holds 10 records. R is organized as a heap file with unclustered indexes, and the records in R are randomly ordered. Assume that attribute a is a candidate key for R, with values lying in the range 0 to 999,999. For each of the following queries, name the approach that would most likely require the fewest I/Os for processing the query. The approaches to consider follow:
• Scanning through the whole heap file for R.
• Using a B+ tree index on attribute R.a.
• Using a hash index on attribute R.a.
The queries are:
1. Find all R tuples.
2. Find all R tuples such that a < 50.
3. Find all R tuples such that a = 50.
4. Find all R tuples such that a > 50 and a < 100.

Step by Step Solution

3.49 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Let h be the height of the B tree usually 2 or 3 and M be the number of data en... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

960-C-S-D (2467).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!