GATE | Gate IT 2007 | Question 63
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 ?
Here σA<=100 signifies a selection query which selects all the tuples which has attribute A’s value less than or equal to 100. Attribute A’s values in the range [0,500] are uniformaly distributed among 1000 tuples. So first when we arrange all 1000 tuples in the ascending order of attribute A’s value, then first 200 tuples will have attribute A’s values in the range [0,99] and next 200 tuples will have attribute A’s values in the range [100,199] and so on .So number of tuples returned by the given selection query is 200.
This solution is contributed by Nirmal Bharadwaj.