Map the object-oriented database design for the DreamHome case study produced in Exercise 27.25 to the ODMG ODL.
What will be an ideal response?
Partial solution as follows:
class Branch {
(extent branches key branchNo)
attribute string branchNo;
attribute struct BranchAddress {string street, string city, string postcode} address;
attribute list< string> telNo[3];
relationship set
relationship Staff Has inverse Staff::WorksIn;
relationship Manager IsManagedBy inverse Manager::Manages;
relationship set
}
class Person {
attribute struct PName {string fName, string lName} name;
}
class Staff extends Person {
(extent staff key staffNo)
attribute string staffNo;
attribute enum SetType {M, F} sex;
attribute date DOB;
attribute enum PositionType {Manager, Supervisor, Assistant} position;
attribute float salary;
relationship Branch WorksIn inverse Branch::Has;
relationship set
relationship set
increaseSalary(in Staff, in float) raises(noSuchPerson);
overseeProperty(in Staff, in PropertyForRent) raises(noSuchPerson, noSuchProperty);
moveBranch(in Staff, in from::Branch, in to::Branch) raises(noSuchPerson, noSuchBranch);
}
class Manager extends Staff {
(extent managers)
attribute date mgrStartDate;
attribute float bonus;
relationship Branch Manages inverse Branch::IsManagedBy;
}
class PropertyForRent {
(extent rentals key propertyNo)
attribute string propertyNo;
attribute struct PropertyAddress {string street, string city, string postcode} address;
attribute string type;
attribute integer rooms;
attribute float rent;
relationship Staff IsOverseenBy inverse Staff::Oversees;
relationship Branch IsOfferedBy inverse Branch::Offers;
relationship set
relationship Owner IsOwnedBy inverse Owner::Owns;
relationship set
relationship set
rentOut(in PropertyForRent) raises(noSuchProperty);
}
class Client extends Person{
(extent clients key clientNo)
attribute string clientNo;
attribute string telNo;
attribute string prefType;
attribute float maxRent;
relationship Registration Agrees inverse Registration::RegistrationFor;
relationship set
relationship set
rentProperty(in Client, in PropertyForRent) raises(noSuchClient, noSuchProperty);
register(in Client, in Branch) raises(noSuchClient, noSuchBranch);
arrangeViewing(in Client, in PropertyForRent) raises(noSuchClient, noSuchProperty);
You might also like to view...
The rating system that recognizes devices that use an average of 20 to 30 percent less energy than comparable devices is EPEAT
Indicate whether the statement is true or false
________ are used to execute a series of statements multiple times
A) Data ports B) Variables C) Elements D) Loops
Which of the following is NOT a vector-drawn object?
a. Lines b. Circles c. Polygons d. Photographs e. Boxes
According to the MLA style, the first line of each entry on the works cited page begins at the left margin.
Answer the following statement true (T) or false (F)