Database Reference
In-Depth Information
We have almost everything we need in order to turn the information
into an ERD, but we have one last thing we need to talk about. We need
to develop our interpretation of payments and explore how they will be
modeled. We were told that Orders have Payments, and there are several
types of payments we can accept. To get our heads around this, we proba-
bly need to talk with the customer and find out what kind of data each pay-
ment method requires. Further discussion with the customer reveals that
each payment type has specific data that needs to be stored for that type,
as well as a small collection of data that is common to all the payment
methods.
When we listed our attributes, we listed credit card, gift card, and elec-
tronic check as attributes of the Payment entity. If you take a closer look,
you will see that these aren't attributes; instead, they seem to be entities.
This is a common problem; orders need to be related to payment, but a
payment could be one of three types, each one slightly different from the
others. This is a situation that calls for the use of a subtype cluster. We will
model a supertype called Payment that has three subtypes, one for each
payment method.
Interpreting Flowcharts
During the requirements gathering phase, you may have used flowcharts
to help gather information about the processes the users follow. For
Mountain View Music, we created a flowchart to gain a better under-
standing of the warehouse processes. Sitting down with the warehouse
manager, Tim Jackson, after observing the warehouse employees for a day,
we came up with the flowchart shown in Figure 6.1.
Let's walk through the life cycle of a product as determined by the
flowchart in Figure 6.1. First, an employee from the purchasing depart-
ment places a purchase order for products from one of Mountain View's
suppliers or vendors. The vendor then ships the product to Mountain View,
where the warehouse employees receive the product. The product is then
placed into inventory, where it is available for purchase by a customer.
When a customer places an order, a packing slip is generated and auto-
matically printed for the warehouse. An employee picks and packs the
products that were ordered based on the detail on the packing slip. Packed
products are then shipped out the door by one of the carriers that
Mountain View uses for shipping.
Search WWH ::




Custom Search