Arvind.<br />SCJP, SCWCD, SCBCD, SCDJWS, SCEA
Arvind.<br />SCJP, SCWCD, SCBCD, SCDJWS, SCEA
SCJA, SCJP, SCBCD & SCEA (Part I)
I see Segment as a line item on a Itinerary too.
But I see a Flight as flight number, and each Flight has 1 or many Legs.
For instance, Flight 3370 has Legs A -> B, B -> C and C -> D.
Then, Customer X can buy the seat number 14C in the Legs from A to C, and Customer Y can buy the same seat 14C in the Leg from C to D.
I introduced a class Reservation, that associate Segment, Leg and Seat.
What do you think?
- So there will be passenger details per segment ?
Would this duplicate the passenger info. May be you can put it at itinerary level and still store the booked seat info at segment level.
Where do you plan to put this higher level object
Originally posted by Jesse Jesse:
I think the 1:1 association between an Equipment and Flight is ok. My reasoning being a flight can only have one Equipment at a specific point in time but this does not stop a flight from having a different Equipment at a different time.
However if I change my model so a flight can have many segments(Seat reservations for a flight) then in my view - so far, this simplifies the model.
If a Flight can have many segments AND if a Flight can have only one Equipment associated with it at a time, then are you presuming that all segments in the Flight would be flown using the same equipment? The relationship between a Flight and multiple Segments would exist at the same point in time as the relationship between a Flight and Equipment - the Itinerary is not going to be updated mid-travel to reflect the changes in Equipment.
IF I agree with the assumption that a segment simply represents one take off and one landing (departure airport, arrival airport)that is qualified by a flight(flight no. price etc as travel terminology suggests and if I agree with the association between segment and flight as being one to one then this implies that a new class needs to be introduced between segment and itinerary to track a customers reservation for a particular segment including seat reservation etc.
I think this is more reasonable. BTW, I need to correct the original assumption I made - an Itinerary can have only 1 Departure and 1 optional Return. If you call each of these a "Reservation Line Item", then the association between Itinerary and Segment could be removed. If you compare the Prepare Itinerary and Change Itinerary use cases, you will see that the terms "flights" and "segments" have been used in a conflicting manner. Introducing a "Reservation Line Item" class seems to be the best way to go as far as I can tell.
Additionally, a Segment can indeed have many Flights (going by my earlier assumption of a Flight "qualifying" a Segment by Date, Time and Flight No.) because the same Segment is going to be used in multiple itineraries (by different Customers) for different Flights. The Segment would then have to be aware of all the Flights that are servicing it (obviously for searches to work).
If a Flight can have many segments AND if a Flight can have only one Equipment associated with it at a time, then are you presuming that all segments in the Flight would be flown using the same equipment? The relationship between a Flight and multiple Segments would exist at the same point in time as the relationship between a Flight and Equipment - the Itinerary is not going to be updated mid-travel to reflect the changes in Equipment.
I think this is more reasonable. BTW, I need to correct the original assumption I made - an Itinerary can have only 1 Departure and 1 optional Return. If you call each of these a "Reservation Line Item", then the association between Itinerary and Segment could be removed. If you compare the Prepare Itinerary and Change Itinerary use cases, you will see that the terms "flights" and "segments" have been used in a conflicting manner. Introducing a "Reservation Line Item" class seems to be the best way to go as far as I can tell.
Additionally, a Segment can indeed have many Flights (going by my earlier assumption of a Flight "qualifying" a Segment by Date, Time and Flight No.) because the same Segment is going to be used in multiple itineraries (by different Customers) for different Flights. The Segment would then have to be aware of all the Flights that are servicing it (obviously for searches to work).
SCJP, SCJD, SCWCD, SCBCD
SCJP 1.4, SCBCD 1.3, SCBCD 5.0, SCEA J2EE, SCEA 5.0
I don't like that guy. The tiny ad agrees with me.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|