• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Seat references in the Segment

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
If we take the segment table in the db , it should also have the seat id column.
What I am thinking is,for each seat id for a segment, it will have a different row in segment table but I am not sure if it will be the best design.
Any comments?
Thanks,
Murat
 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any comments?
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Depending on which persistency mechanism you are using... I have used DAO and including just the seatID column is enough.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you talking about DB design matching the Class structure?
In my opinion, segment repeating in the DB for each seat is not a good idea. In class design you can have a collection holding the seat reference and DB has a seperate table with seats and their segment Ids. This is what how I was thinking.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a better way to solve this problem is to model this in OBJECTS.
remember you are going to be evaluated in how you resolve and design the domain model in class diagrams (objects not tables) .... 44 points ....
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I fully agree with Santiago!

As the big book (GoF) says:

... Object-oriented document editors typically use objects to represent embedded elements like tables and figures. However, they stop short of using an object for each character in the document, even though doing so would promote flexibility at the finest levels in the application.



BIG concept!

-- Dan
 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your answers. I fully aggree with you.
But I am considering to use Entity beans which directly corresponds to tables. (Am I wrong?)
Ofcourse,my high level class diagram will not include those entities but I was wondering how will it look like in a detailed class diagram.
Thanks again,
Murat
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic