Question: 1. Consider the relation r (Key, Name, Address). The relation takes 100 blocks on disk and holds 10000 tuples. a. What is the selectivity of

1. Consider the relation r (Key, Name, Address). The relation takes 100 blocks on disk and holds 10000 tuples.

a. What is the selectivity of an equality predicate on Key?

b. Given a secondary IndexName (height = 3) and a range predicate on Name with selectivity of 0.02, estimate the cost of doing the lookup on A.

c. Given a clustered IndexName (height = 2) and a range predicate on Name with selectivity of 0.02, estimate the cost of doing the lookup on A.

d. Given a predicate PA with selectivity of 0.3 and a predicate PB with a selectivity of 0.5, what are the selectivities of:

(NOTE: you just need to compute the selectivity value, you do not need to estimate any costs in this part. You will have to make some assumptions about correlation between PA and PB)

  1. NOT PA
  2. PA AND PB
  3. PA OR PB
  4. PA AND (NOT PB)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!