In-Class Exercise
Suppose we had a table PERSON with 100 million rows. In these rows, the EYE_COLOR attribute can take one of six values.
Further, in these rows, the ANNUAL_INCOME attributes take on 5000 distinct values. Solve the following problems:
- You only want to date people that don't have red eyes. Write this as a relational algebra query, and estimate the number of tuples
returned.
- You only want to date people that have green eyes. Write this as a relational algebra query, and estimate the number of tuples
returned.
- You only want to date people that have annual incomes over 50000. Write this as a relational algebra query, and estimate the number of tuples
returned.
Post your answers to the Mar 7 In-Class Exercise Thread.