The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 5 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
6.    Exercise 15.2 Consider a relation with this schema:
Ernployees(eid:Â integer, ename:Â string,Â
 integer, title: string, age:  integer)
Â
Suppose that the following indexes, all using Alternative (2) for data entries, exist: a hash index on eid, a B+  tree index on  sal,  a  hash index on  age,  and  a  clustered B+  tree index on (age, sal). Each Employees record is 100 bytes long, and you can assume that each index data entry is 20 bytes long. The Employees relation contains 10,000  pages.
Â
1.    Consider each of the following selection conditions and, assuming  that  the  reduction factor (RF) for each term that matches an index is 0.1, compute the cost of the most selective access path for retrieving all Employees tuples that satisfy the condition:
(a)Â Â sol> 100
(b)Â Â Â Â Â Â Â Â Â = Â 25
(c) Â
 20
(d)Â Â eid =Â Â 1, 000
(e)Â Â sal> Â 200Â Â Â Â age> 30
(f)Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ![]()
age = 20
(g)Â sal>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ='CFO'
(h)Â sal> 200Â Â Â Â Â Â Â age>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ='CFO'
2.    Suppose that, for each of the preceding selection conditions, you want to retrieve the average salary of qualifying tuples. For each selection condition, describe the least ex• pensiveÂ
 method and state its cost.
![]()
Suppose that, for each of the preceding selection conditions, you want to compute the av-• salary for each age group. For each selection condition, describe the least  expensive
evaluation method and state its cost.
4.  Suppose that, forÂ
 ofÂ
 preceding selection conditions, you want to compute the average age for each sa/level (Le.) group by sal). For each selection condition, describe the  least  expensive evaluation  method  and  state its cost.
Â
Â
                                                                                                                         Â
Â
 For each of the following selection conditions, describe the best evaluation method:
(a)Â Â Â sal> 200 V age = 20
(b)Â Â sal>Â 200 V title ='CFO'
(c)  title ='CFO' 1\ ename  ='Joe'
Â
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll