My understanding of itinerary/segment/leg/flight/equipement is .....
-An Itinerary can have 1 departure, 1 return. Return is only optional. Will have reference to segment(s),reference to customer,total itinenary price. Has 1-many relationship with segment.
-A Segment is from departure place to the end destination, with optional lay over in between. Thus for one-way trip an itinerary will have 1 segment only, while round-trip will have 2 segments. Segment is a line item in itinerary ( like order and orderitem). Will have details like start city, destination city, departure time and date, arrival date and time, price (for the segment), segment distance, reference to intermediate legs. Has 1-many relation ship with leg.
- Leg is one take-off and landing. Thus a segment can have multiple legs. For 1 leg a segment, leg and segment becomes same. Price is set against segment and not individual legs. Will have details like start city and destination city (for individual leg), leg distance, reference to flight. Has 1-1 relationship with flight.
- Flight qualifies a leg as a take-off and landing on a particular departure day at a particular departure time. Will have details like flight no, start time and date, arrival time and date, reference to equipement. Relationship between flight and equipement (plane) is many to 1.
- Equipement has 1-many relation with seat.
Want to validate that with u guys ..... problem is - where do i fit in the seat for each leg that customer has selected.