Question: Using the Property relational schema ( repeated for your convenience ) : property ( pID , region, county, eircode, numBeds, numBaths, capacity, pricePerNight, petsAllowed, propAmens,
Using the Property relational schema repeated for your convenience:
propertypID region, county, eircode, numBeds, numBaths, capacity, pricePerNight, petsAllowed, propAmens, ownrID
owneroID oName, oAddress, oEmail, oPhone
customercID cName, cAddress, cEmail, cPhone
propBooking bID startDate, endDate, numPpl, totalPrice, custID, propID
a Write relational algebra expressions to satisfy the following information needs:
i List the Eircode, price and property amenities of all properties in Co Wicklow which can accommodate people.
ii List the names and addresses of all customers who have a booking for a property where the total price of the booking exceeds euro.
b Given the request: List the names and contact details of all customers who have bookings between and for properties located in the regions Newport or Achill which can accommodate people and pets, and have a woodfire stove as a property amenity.
i Write an SQL query using implicit or explicit joins which will retrieve the required information.
ii Using the SQL query created in part i create a canonical query tree which represents the query. Explain the steps you take to create the tree, highlighting what parts of the SQL query are represented by the different parts of the tree.
iii Using the canonical query tree from part ii and with respect to heuristicbased optimisation, develop a query tree that represents an efficient evaluation strategy for the SQL query. In the course of your answer:
Explain the steps taken, describing each heuristic used.
Explain why the tree developed will have a more efficient evaluation than the canonical query tree created in part ii
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
