Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I fear, I can not give the "common pattern" how to deal with this problem. But I also think, that there is not the "one and only" pattern at all.</p> <p>The reason is, that modelling is somehow "fuzzy". I remember some rather similar modelling problem in a German computer magazine. It was a kind of contest and they showed the different solutions they got send in. The solutions where totally different, yet all of them where somehow valid. I think that it also depends on the details of the problem at hand. Sometimes a "lean" solution is beautiful ... in other cases, the "big, fat, grand" solution must be done to meet the projects needs ...</p> <p>Such as, modelling is still a creative task with many free parameters.</p> <p>Off course there are some "meta-patterns" which are agreed upon. For example in the book <a href="http://en.wikipedia.org/wiki/Design_Patterns_(book)" rel="nofollow noreferrer">"Design patterns"</a> by the famous "Gang of Four" and also many others available. But still many problems exist, where no agreed "best" solution exists.</p> <p>In your case, it would be possible to use sub-classing (this is equivalent to specialization). It could also be possible to make "Supplier" etc. just an interface which might/might not be supported by a company (this could be seen as optional specialization from an abstract Entity). But it is also possible to use composition for the same problem. A Role could be an object (Entity) that is linked by the company (e.g. with a relation "has-role").</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload