Map the object-oriented database design for the Wellmeadows case study produced in Exercise 27.28 to the ODMG ODL.

What will be an ideal response?

class Ward {
(extent wards key wardNo)
attribute string wardNo;
attribute string wardName;
attribute string location;
attribute integer totalBeds;
attribute string telExtn;
relationship list HasWaitingList
inverse WaitingList::IsWaitingFor
{order_by WaitingList::listDate, wardReq};
relationship list HasStaffRota
inverse StaffRota::OnShiftFor
{order_by StaffRota::wardNo, weekNo};
relationship set Receives inverse Requisition::ReqFor;
relationship Nurse IsChargeNurseFor inverse Nurse::ChargeFor;
assignChargeNurse(in Nurse) raises(noSuchNurse);
}
class Person {
attribute struct PName {string fName, string lName} name;
attribute string address;
attribute string telNo;
attribute date DOB;
attribute char sex;
}
deftype struct Qualification {date qDate, string qType, string institutionName;}
deftype struct WorkExperience {date sDate, date fDate, string position, string orgName;}
class Staff extends Person {
(extent staff key staffNo, NIN)
attribute string staffNo;
attribute string NIN;
attribute string position;
attribute float salary;
attribute integer sScale;
attribute integer weekHrs;
attribute char contType;
attribute char typePay;
attribute set qualifications;
attribute set< WorkExperience> experience;
relationship list HasRota
inverse StaffRota::ShiftFor
{order_by StaffRota::staffNo, weekNo};
increaseSalary(in Staff, in float);
}
class Nurse extends Staff {
(extent nurses)
relationship Ward ChargeFor inverse Ward:: IsChargeNurseFor;
relationship set Makes inverse Requisition::IsMadeBy;
makeRequisition(in Nurse, in Pharmaceutical) raises(noSuchDrug);
}
class Consultant extends Staff {
(extent consultants)
relationship list Sees
inverse Appointment::IsSeenBy
{order_by Appointment::consStaffNo, aDate, appTime};
cancelAppointment(in Consultant, in Appointment);
}
class StaffRota {
(extent rotas)
attribute integer shift;
attribute integer weekNo;
relationship Ward OnShiftFor inverse Ward::HasStaffRota;
relationship Staff ShiftFor inverse Staff::HasRota;
}
deftype struct NextOfKin {string nName, string nRelationship, string nAddress, string nTelNo;}
deftype struct OutPatientAppointment {date outPatDate, time outPatTime;}
class Patient extends Person{
(extent patients key patNo)
attribute string patNo;
attribute char mStatus;
attribute date dateReg;
attribute NOK;
attribute set appointment;
relationship Doctor IsReferredBy inverse Doctor::Refers;
relationship set Attends inverse Appointment::ApptFor;
relationship set Takes inverse Medication::IsTakenBy;
relationship list WaitsFor inverse WaitingList::IsOn;
changeDoctor(in from:Doctor, in to:Doctor) raises(noSuchDoctor);
cancelAppointment(in Appointment) raises(noSuchAppointment);
}
class Doctor {
(extent gps key (docName, clinicNo))
attribute string docName;
attribute string address
attribute string telNo;
attribute string clinicNo;
relationship set GPFor inverse Patient::HasGP;
}
class Appointment {
(extent appointments key appNo)
attribute string appNo;
attribute date appDate;
attribute time appTime;
attribute string roomNo;
relationship Patient IsApptFor inverse Patient::HasAppt;
relationship Consultant IsSeenBy inverse Consultant::Sees;
}
class WaitingList {
(extent waiting )
attribute date listDate;
attribute interval duration;
attribute date placedDate;
attribute date exLeaveDate;
attribute date actLeaveDate;
attribute string bedNo;
relationship Ward IsWaitingFor inverse Ward::HasWaitingList;
relationship Patient IsOn inverse Patient::WaitsFor;
addToList(in Patient, in Ward) raises(noSuchPatient, noSuchWard);
removeFromList(in Patient, in Ward) raises(noSuchPatient, noSuchWard);
}
class Medication {
(extent medications)
attribute string unitsDay;
attribute string aMethod;
attribute date sDate;
attribute date fDate;
relationship Patient IsTakenBy inverse Patient::Takes;
relationship Pharmaceutical Contains inverse Pharmaceutical::Forms;
addMedication(in Patient, in Pharmaceutical) raises(noSuchPatient, noSuchDrug);
changeMedication(in Patient, in Pharmaceutical) raises(noSuchPatient, noSuchDrug);
}
class Pharmaceutical {
(extent drugs key drugNo)
attribute string drugNo;
attribute string dName;
attribute string description;
attribute string dosage;
attribute string methodAdmin;
attribute integer quantityStock;
attribute integer reorderLevel;
attribute float unitCost;
relationship set Forms inverse Medication::Contains;
relationship set PFor inverse Requisition::PReqsFor;
relationship Supplier PIsProvidedBy inverse Supplier::PProvides;
class Non-Surgical/Surgical {
(extent supplies key itemNo)
attribute string itemNo;
attribute string iName;
attribute string iDescription;
attribute integer quantityStock;
attribute integer reorderLevel;
attribute float unitCost;
relationship set IFor inverse Requisition::IReqsFor;
relationship Supplier IIsProvidedBy inverse Supplier::IProvides;
}
class Requisition {
(extent requisitions key reqNo)
attribute string reqNo;
attribute integer quantReq;
attribute date dateOrder;
attribute date dateReceive;
relationship Ward ReqFor inverse Ward::Receives;
relationship Nurse IsMadeBy inverse Nurse::Makes;
relationship Pharmaceutical PReqsFor inverse Pharmaceutical::PFor;
relationship Non-Surgical/Surgical IReqsFor inverse Non-Surgical/Surgical::IFor;
}
class Supplier {
(extent suppliers key supplierNo)
attribute string supplierNo;
attribute string sName;
attribute string sAddress;
attribute string telNo;
attribute string faxNo;
relationship set PProvides inverse Pharmaceutical::PIsSuppliedBy;
relationship set IProvides inverse Pharmaceutical::IisSuppliedBy;
}

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1) The print and the println methods are identical and can be used interchangeably. 2) A String literal may span multiple lines in the program code. 3) Java is a strongly-typed language. 4) Variables declared with the final modifier cannot have new values assigned to them. 5) The byte type can be assigned a larger range of numbers than the int type.

Computer Science & Information Technology

Exceptions can be thrown by ________.

a. the Java Virtual Machine. b. code in a try block. c. calls from a try block to other methods. d. All of the above.

Computer Science & Information Technology