posted 19 years ago
Hi guys,
In a class diagram I must represent the most static part (the Data Base view) or the interactions part (instance view) of the relationships???
Example:
A segment is a part of a great trip and each segment can be covered by many flights. Real example:
Itinerary BH-NEWYORK
--------------------
Segment 01: BH - SP
Covered by the Flights VARIG001(07:00), VARIG002(08:00) and VARIG003(10:00)
Segment N: The other segments ....
DB View: The relationship will be:
Itinerary 1 ----- 1..* Segment 1..* ------- 1..* Flight
It's clear that a Flight will pass by many places (example: VARIG001 will pass by RJ, BH and SP covering two segments RJ-BH and BH-SP), so will cover many Segments. Like the example a segment can be covered by many flights in different times.
Instance View:
In a particular Itinerary for the customer BOB, the Segment 01 will be made by the Flight VARIG001 because BOB made this option.
So the relationship will be:
Itinerary 1 ----- 1..* Segment 1 -------- 1 Flight
What is the correct approach??? I am choosing the second one...
If I miss something, sorry for the bad english...
Thank you so much!
Eduardo Rodrigues<br />SCJP 1.4/5.0 SCWCD 1.3/1.4, SCBCD 1.3, SCMAD, SCEA<br />IBM 484 & 486<br />Belo Horizonte<br />Minas Gerais<br />Brasil