Consider a selection of the form σA≤100(r), where r is a relation with 1000…
2007
Consider a selection of the form σA≤100(r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are uniformly distributed in the interval [0, 500]. Which one of the following options is the best estimate of the number of tuples returned by the given selection query ?
Answer: D. 200 — The selection σA≤100(r) filters tuples where attribute A is less than or equal to 100. Since values are uniformly distributed over [0, 500], the proportion of…
- A.
50
- B.
100
- C.
150
- D.
200
Attempted by 32 students.
Show answer & explanation
Correct answer: D
The selection σA≤100(r) filters tuples where attribute A is less than or equal to 100. Since values are uniformly distributed over [0, 500], the proportion of tuples satisfying A≤100 is (100 - 0) / (500 - 0) = 1/5. With 1000 tuples, the expected number is 1000 * (1/5) = 200.
A video solution is available for this question — log in and enroll to watch it.
Explore the full course: Ssc Je Imd Scientific Assistant Computer Science