Now that we have defined business objects and relationships we can define attributes of each business object. There are two types of attributes –simple attributes (text, number, date, picture etc) and those representing relationships or references).
Values of some attributes are entered by users, whereas values of other attributes are always calculated by the system and never entered by users. The latter attributes are called calculated attributes.
By carefully studying the requirements we can identify the following attributes of the objects:
Item Object
Attribute
Type
Description
Title
text
Author
text
Code
text
Description
text
Picture
image
Location
text
InternalStatus
text
possible values Released and Withdrawn
Reference
see the relationships of the Item object
Reference
Description
Type
a reference to the single ItemType object that the Item belongs to
Loans
a list of Loan objects for the item, calculated
Reservations
a list of Reservation objects for the item, calculated
ItemType Object
Attribute
Type
Description
Name
text
Book, CD, Video etc)
MaxBorrowNumber
number
MaxLoanPeriod
number
MaxRenewals
number
Member Object
Attribute
Type
Description
FirstName
text
LastName
text
Address
text
DateOfBirth
date
Gender
text
Male or Female
EmailAddress
text
MemberNumber
number
unique number associated with a member - calculated
Photo
picture
Status
text
Active or Suspended
References
Reference
Description
Loans
a list of Loan objects, calculated
Reservations
a list of Reservation objects, calculated
Fees
a list of Fee objects, calculated
Payments
a list of Payment objects, calculated
Loan Object
Attribute
Type
Description
DueDate
date
the date the loan is or was due
ReturnDate
date
the date the loan was returned - calculated
Status
text
New, Current, Past - calculated
References
Reference
Description
Member
reference to a single Member object, calculated
Item
reference to a single Item object, calculated
Reservation Object
Attribute
Type
Description
ReservedOn
timestamp
the date and time when the reservation was made, calculated)
BorrowedOn
timestamp
the date and time the reservation was borrowed, calculated)
ItemOfferedOn
timestamp
the date and time the reservation was offered, calculated)
Status
text, calculated
New, Waiting – if reservation is waiting for item to be returned, Offered – if reservation has been offered but not taken up, Converted – if reservation has been taken up, Cancelled – if reservation has been cancelled by owner, Expired – if reservation has expired
References
Reference
Description
Item
a reference to a single item that has been reserved, calculated
Member
a reference to a single member who made the reservation, calculated
Fee Object
Attribute
Type
Description
Amount
number
Description
text
AppliedOn
date
the date the fee was charged, calculated
References
Reference
Description
Member
reference to a single member who was charged, calculated
Payment Object
Attribute
Type
Description
Amount
number
Description
text
AppliedOn
date
the date the payment was made, calculated
Status
text
New or Applied
References
Reference
Description
Member
reference to a single member who made a payment, calculated
In addition we will introduce a few attributes that will display summarized information to the user:
Item Object
Attribute
Type
Description
Available
yes/no
this is the flag that indicates whether the item is available. In principle, this information can be derived from the information about loans associated with the item. It is, however, very convenient to immediately show to the user whether the item is available (both in queries on item or in the item form)
CurrentReservation
Reference
this is a reference to the reservation that is the first in the queue of reservations. We define this attribute purely for convenience to avoid calculating it every time it is needed (it will be needed by a number of rules).
Member Object
Attribute
Type
Description
OutstandingCharges
Number
Indicates whether the member owes something to the library. Again, in principle, this information can be derived from the information about fees and payments, however, it is very convenient to show this number to the user.