• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About class diagram relationships - Part 2

 
Eduardo Rodrigues
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I choosed the second option!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic