28
Relations Algrabra and optimization Consider the following SQL query that retrieves five-star Hotel names (HotelName) and the arrival date (ArrivDate) of eah !oo"ing suh that Status is  Arrived  (i#e# $A%)# SELECT H.HotelName, B.ArrivDate FROM Hotel H, BOOKING B WHERE H.HotelId B.HotelId  AND H.Rati!" #  AND B.Stat$ % &A' &he SQL query is onv erted into the following relational alge!ra ('A) query tree# ( HotelName, ArrivDate HotelId HotelId )  BOOKING HOTEL Rati!" # a!d Stat$% *A* Assume the following information &he age si*e is +,. !ytes# /0 tree inde1es (lustered) on 'ating for H2&3L and on Hotel4d for /2254N6# &here are 7,, reords in Hotel8 eah reord of 9, !ytes8 and the overall si*e of Hotel relation is . ages# &here are +,8,,, reords in /2254N68 eah reord of :, !yte s8 and the overall si*e of /2254N6 relation is 79; ages# &he Com!ined si*e of ro<eted attri!utes is 7 !ytes (HotelName = +7 !ytes8 ArrivDate = +, !ytes)# &here are ., five star hotels and +,,, !oo"ings with  Arrived  Status# &he num!er of tules in the query result is .,,# &he num!er of !uffer ages availa!le is :# i#e# / = : &he onstant ost fator used in ro<etion is given !y  log /-+  > / = log :-+  > : = log 7 + = log + ? log 7 = +#7.@;

RA and Optimisation Walk Through

Embed Size (px)

Citation preview

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 1/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 2/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 3/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 4/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 5/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 6/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 7/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 8/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 9/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 10/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 11/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 12/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 13/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 14/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 15/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 16/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 17/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 18/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 19/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 20/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 21/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 22/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 23/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 24/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 25/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 26/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 27/28

8/12/2019 RA and Optimisation Walk Through

http://slidepdf.com/reader/full/ra-and-optimisation-walk-through 28/28