Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Correct Design

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a system in which every work order is contained within an operation. I have set them up so that an estimate and work order is linked by an order detail.
My question is an estimate can exists by itself and so can a work order exist by itself.
multiple estimates can have details within one work order and vice versa
I have defined it where an estimate is contained inside an operation and a work order is also?
My question is this right or should the work order contain estimates.
nick
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nicholas Turner:
I have a system in which every work order is contained within an operation. I have set them up so that an estimate and work order is linked by an order detail.
...
multiple estimates can have details within one work order and vice versa
I have defined it where an estimate is contained inside an operation and a work order is also?
My question is this right or should the work order contain estimates.


Contained/have/linked are subject to ambiguity.
To me "Containment" or "Aggregation" means that the lifetime of the CONTAINER controls the lifetime of the item in the container. When the container dies, the contained items also go away. Is the association you are descibing that strong?
Linked/linking (to me) is weaker. Two things are able to "find" each other.
Think about what you want to have happen when an object of one type is destroyed:
  • Related object is also destroyed
  • The link or association between the objects is removed but the other object still exists
  • When you say:

    every work order is contained within an operation


    do you really mean that the work order is created in the operation (like a local variable) and does not exist/persist after the operation completes?
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic