Using the following relational schema ,
Owner (ownerNo, oName, oAddress, oTelNo)
Pet (petNo, petName, petDescription, petSex, petDOB, dateRegistered, ownerNo,
surgeryNo)
Staff (staffNo, sName, sAddress, sTelNo, sex, DOB, position, NIN, taxCode, salary,
surgeryNo)
Surgery (surgeryNo, surgeryAddress, surgeryTelNo, surgeryFaxNo, mgrStaffNo,
areaNo)
Prescription (prescNo, petNo, medNo, prescStaffNo, adminMethod, unitsPerDay,
startDate, finishDate)
Medication (medNo, medName, description, dosage, cost)
Area (areaNo, areaName)
Map the following query onto a relational algebra tree, and then transform it into a reduced query:
SELECT P.petNo, petName, oName, oAddress FROM Pet P, Owner O, Prescription P, Medication M WHERE PR.medNo = M.medNo AND
PR.petNo = P.petNo AND P.ownerNo = O.ownerNo AND medName = ' Provac' AND unitsPerDay > 200 AND petDescription = 'Setter';