Seminar One – Discussion Questions
1. Perfect Pizza delivers island-wide to customers who must call to place their orders. The
customer phone number is recorded, along with the customer name, address, delivery time
required and the pizza types (identified by name and size) and number required. orderItem
The order is then assigned to a delivery staff who is also responsible to collect cash as
payment is currently by cash only.
In some cases, a customer may place another order before the delivery of the first order. In
such a case, one delivery staff should deliver all the orders of the same customer together.
Delivery rounds are made every half an hour by different delivery staff who are assigned
rounds and leave either at the hour or half an hour. At any time, a delivery staff is either at his
base, waiting to start delivery or is making his delivery round.
At the end of each round, the delivery staff submits cash for those orders delivered in that
round. The amount must be recorded to account for the orders he has just delivered.
Create an ER model to represent the data model for Perfect Pizza. Provide the relevant
entities, with name, attributes and identifier,
relationships with cardinalities and relationship name
in your ER model.
Answer:
Page 1
Seminar One – Discussion Questions
Company ABC keeps records of payslip for a period of ten years. Each payslip shows:
A unique payslip reference number.
Employee number, name and position of the employee held during the payslip period.
Each allowance paid has an allowance type and an amount paid.
In the case of non-zero overtime hours, the payslip shows the overtime hourly rate and the
overtime pay. Overtime hourly rate is computed by dividing the basic monthly pay by 88, and
overtime pay is the product of overtime hours and overtime hourly rate.
An allowance type has a unique code, a name and an upper limit allowable. For example,
transport allowance has a code TPT, name Transport and an upper limit $350. The allowance
types that an employee gets depend on the employee’s position, and may change when an
employee has a change in position. For example, as a delivery staff, an employee has uniform and
transport allowances but these allowance types may not be applicable when the employee is
promoted to a managerial position.
The allowance amount depends on the amount incurred by an employee during the payslip period,
subjected to the upper limit for the allowance type. It is possible that, although entitled to, an
employee may not be given an allowance. For example, an employee on long hospitalisation leave
does not receive transport allowance.
Each employee has a unique employee number, name, basic monthly pay, a current position and
other past positions, if applicable. The start and end dates of each position held are recorded. The
end date for a current position is empty and is filled when the employee is out into a new position.
Answer:
Page 2
Seminar One – Discussion Questions
2. A matching-making agency provides opportunities for its members to meet one another in a
variety of activities, in the hope of developing a lasting relationship.
Activities organised fall into two categories: group events and dinner dates. Group events
with limited capacity, range from motivational talks to cooking workshops and guided tours,
and are scheduled on a monthly basis. For members who prefer a non-group setting, the
agency provides dinner dates on which one member meets another member.
As a safeguard to its members, all dinner dates are chaperoned by the staff who matches pairs
of members and arranges the dinner date. Before a dinner date, each member in a pair receives
the bio-data (name, race, age, religion, occupation and hobbies) of each other and must be
willing to meet. Subsequent dates are arranged by members themselves and do not require a
chaperon. The agency does not need to be informed about these subsequent dates.
Members who have met through a dinner date are recorded as having met to ensure that
members are always given new dining partners when requesting for dinner dates.
Members join on a yearly membership and are entitled to two free activities: a free group
event and a free dinner date, both of which must be consumed within 6 months of
membership. The activity id (of the group event or dinner date) is recorded against the
member’ membership number when each free activity is claimed.
Subsequent activities are charged per activity basis, depending to the event program (in the
case of group events) and dining venue (in the case of dinner dates). A member must quote
his membership number when registering for activities.
The agency has a loyalty program whereby members receive a 5% discount for each
consecutive year of membership, subject to a maximum of 50% discount.
Create an ER model to represent the data model for the match-making agency. Provide the
relevant
entities, with entities name, relevant attributes and identifier,
relationships with cardinalities and relationship name
in your ER model.
Page 3
Seminar One – Discussion Questions
Activity
Activity_id
Name
Cost
Type
Date
participates
hasMet
Member
Membership_num
Type
Venue
DinnerDate
Name
Race
Age
Religion
Occupation
Date_Joined_Since
Date_Expired
Discount
Program
Capacity
GroupEvent
participatesFreeEvent
arranges
MemberHobby
participatesFreeDinner
Membership_num
Hobby
Staff_num
Name
Staff
Page 4