Database Reference
In-Depth Information
Figure 6: ORM subschema for library membership
We now turn to the library application. For convenience, we divide the ORM schema
into four subject areas: membership, loan, book, and book shipment. Figure 7 shows the
main aspects of the membership subschema. The reference mode “Id” for Person indicates
that each person has a value-based identifi er , called PersonId, used in human communica-
tion. Each person also has a name, not necessarily unique. A library year is a calendar year,
at some time during which the library was in operation. The reference mode “CE” denotes
“Common Era”, indicating calendar years are based on the Gregorian calendar.
The association Membership covers Year is
objectifi ed
Membership. Its association with FeeType indicates whether or not a given member has
been granted a reduced membership fee for a given year. If desired, a derived fact type may
be added to infer the fee paid for a given annual membership, based on the fee type and the
membership fee of that type for the given year. For simplicity we assume that a member
pays the full annual fee regardless of when he/she began or renewed the annual membership.
In practice, it would be more commom to apply a pro-rated fee or extend the membership
to a year after the date paid.
By default, predicates are read left to right and top to bottom. A reversed reading
direction is indicated by a back arrow “ << ”. The fi rst role of the fact type Person was
born on Date is optional. This means it is optional whether we record a person's birth date
(even though in the real world each person has a birth date). An ORM model refl ects the
universe of discourse (i.e., those aspects of the application world that we wish to discuss,
and the rules that we wish to enforce), so the model need not agree in every respect with the
real world. In this aspect, ORM differs from DEMO, where birth date is mandatory simply
because each person in the real world has a birth date.
The life-buoy symbol (combination of inclusive-or and exclusion symbols) denotes an
exclusive-or constraint : each Person was born on a Date or had alternative minimum
bership covers Year objectifi ed as the entity type Annual-
objectifi ed as the entity type Annual-
 
Search WWH ::




Custom Search