Essay
Consider the following schema:
Pet (petNo, petName, petDescription, dateRegistered, picture, surgeryNo, doctorStaffNo)
Staff (staffNo, sName, sAddress, position, surgeryNo)
Surgery (surgeryNo, surgeryAddress, surgeryTelNo)
where:
Pet contains details of pets and the pet number (petNo) is the key. The surgery where the pet is registered is given by the surgery number (surgeryNo). A pet can only be registered with one surgery at a time. The doctor who treats the pet is given by the doctorStaffNo. Picture contains an image of the pet.
Staff contains details of staff and staff number (staffNo) is the key.
Surgery contains details of each surgery and the surgery number (surgeryNo) is the key.
Now consider the following SQL:2003 query:
SELECT petNo, staffNo
FROM Pet p, TABLE StaffDoctors s
WHERE p.doctorStaffNo = s.staffNo AND
p.brownShortHairedTerrier(picture) AND s.surgeryNo = 'S3' AND
p.dateRegistered < '1-Jan-90';
The routine brownShortHairedTerrier() is an externally defined routine that searches the specified image for certain characteristics. The StaffDoctors() function is fully defined within SQL3 as:
CREATE FUNCTION StaffDoctors() RETURNS SET(Staff)
SELECT * FROM Staff WHERE position = 'Doctor';
Discuss how you would want a query optimiser within an ORDBMS to handle this type of query. Use a relational algebra tree to illustrate your answer.
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Compare and contrast the two manifestos: Object-Oriented
Q3: Given the following example of an
Q4: Explain why planning is important in the
Q5: Explain the procedures and techniques needed to
Q6: Explain what is meant by application prototyping
Q7: The on-going debate between proponents of the
Q8: Discuss the importance of planning in the
Q9: In the Object Relational Model (ORM) an
Q10: Discuss how the proposed SQL:2011 standard will
Q11: The application prototyping approach to software development