Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Cade's BDM & Class Diagram

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you refer the Cade's BDM, Order and Product has many-to-many relationship, in Class diagram, Order-Product relationship changed and introduced a new class called LineItem.
Here product class assumed to hold list of products, lineitem class is introduced to hold list of products selected by customer to a perticular order.
Similar way, in SCEA BDM, Itenary and Segment has 1-to-many relationship.In the class diagram,is it good to hava a class called LineItem/ItenaryItem between Itenary and Segment which will hold segments selected by the customer for a perticular itenary. In this case, segment class will contain list of segments available for customer selection.

Any comments about this approach?
 
Sarbur sar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any comments?
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm

I don�t see this way.

A segment has a 1-1 relationship with a flight. You may see it as a Segment IS a Seat booked in a Flight by a Customer.

IMO, this lineItem/ItineraryItem is unnecessary
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Cleuton.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In My Opinion, segment is a HOP/stop in the journey. So the itinerary can have 1 to many HOPS or segments. For example for journey between New York and Detroit there could be two stops one from New York to Columbus and second from Columbus to Detroit and each segment may have different airlines. Each segment will have its own attributes.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just little amendment. Segment can have more than one reserved seat but generally it depends on conrete architecture.

Petr

(SCJP, SCBCD, SCWCD, SCDJWS, SCMAD, SCEA-I)
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-------------------------------------------------------------------
A segment has a 1-1 relationship with a flight.
-------------------------------------------------------------------

I agree with you in one direction. I think a segment has a direct relation with only one flight but I think in the reverse direction I flight can be related with more than one segment. If I mantain a 1-1 relationship I�m saying that a flight only can have one reservation.

Am I wrong? Please, I need to clear my doubts.

-------------------------------------------------------------------
You may see it as a Segment IS a Seat booked in a Flight by a Customer.
--------------------------------------------------------------------

I think you can book more than one seat per segment.
For example I can book two seats in a segment JFK - LAX.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!