140 likes | 146 Views
CS E 4 4 1: Systems Analysis & Design. ERD – Detailed Study LAB 4 Yusuf Altunel. SELECTING ENTITIES. Each engineer is allocated one van (which is driven up to a certain mileage and then replaced). Each member has only one address but perhaps many vehicles .
E N D
CSE 441: Systems Analysis & Design ERD – Detailed Study LAB 4 Yusuf Altunel
SELECTING ENTITIES Each engineer is allocated one van (which is driven up to a certain mileage and then replaced). Each member has only one address but perhaps many vehicles. Each visit is to deal with only one vehicle. A member can be visited more than once on any given date, and there may be many visits to a member on different dates. A member may only be covered for some of the vehicles they own and not for others.
The nouns in the description are: engineer, van, mileage, member, address, vehicle, visit and date. • Entities Possible attributes • Engineer: name, address and telephone no • Van: registration number and mileage • Member: membership no, name, address and telephone no • Vehicle: registration no, make and model • Visit: date of visit, purpose of visit and cost of visit
Other nouns in the description : • mileage is an attribute of the entity van; • address is an attribute of the entity customer; • date is an attribute of the entity visit.
IDENTIFYING RELATIONSHIPS • A sale always starts with a customer receiving an estimate. • The estimate then becomes an order. • An order can be for one or more stockitems. • Each stock item belongs to a certain stock category • taps,sinks,cupboards etc.
The relationships between these entities: • an Estimate becomes an Order; • an Estimate is issued to a particular Customer; • an Estimate refers to a Stock Item(s); • an Order is placed by a Customer; • an Order refers to Stock Item(s); • a Stock Item belongs to a particular Stock Category.
DEGREES OF RELATIONSHIPS 1) A customer can be issued with one or more Estimates and an Estimate is issued to only one Customer.
2) A customer can place one or more Orders and an Order is placed by only one Customer.
3) An estimate can become only one Order and an Order is derived from only one Estimate.
4) An Estimate refers to one or more Stock Items and a Stock Item may be present on one or more Estimates.
5) An Order refers to one or more Stock Items and a Stock Item may be present on one or more Orders.
6) A stock Item will belong to only one Stock Category and a Stock Category will contain one or more Stock Items.