Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | Gate IT 2007 | Question 63

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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 ?
(A) 50
(B) 100
(C) 150
(D) 200


Answer: (D)

Explanation:  

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.


Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article