Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCEA part 2. Strange domain model

 
Kiril Nugmanov
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,


Currently I hav an assignment with strange relations among object (see attachment as example) - many-to-many. Can I in class diagramm introduce additional classes between 2 objects to chane relationshit to one-to-many and many-to-one?


Class Diagram0.jpg
[Thumbnail for Class Diagram0.jpg]
Domain model
 
Georgiana Lungu
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I could understand from UML Distilled, you can do this, but my question is another, as I am also in the situation of adding this in my solution, does it really make sense to do this? In my situation, for example stepping into the relation with another class, has no real logical value added, as it acts become like a mirror between the ends, and, hence, I would still rather see the relation as 1 to 1 or many to 1 at most.
What assignment do you have?
 
Kiril Nugmanov
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a Gemstone International. Generally I think such model could confuse - if there is many-to-many its better not to display such relationship (it won't confuse any one).
 
san kumar parihar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kiril - Is it Goods or Type of Goods? This makes sense if it is "Type" and not the actual Goods items.
 
Kiril Nugmanov
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
san kumar parihar:

As I understood it Goods. There can be several types of goods but all they extending base class Goods. So between Order and Goods I introduces OdrerEntry which contains specific Good prams like quantity, color etc.
 
san kumar parihar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope I am not oversimplifying your problem but what you are saying is - Order can have many OrderEntry, and OrderEntry is described by a Type of "Good".
You refactored your model from:
Order -> Goods Type (* to *)

TO:

Order-->OrderEntry (1 to *)
OrderEntry --> Goods (* to 1) [As one Goods Type can describe multiple OrderEntry]

This is more or less similar to Figure 1 and Figure 2 as explained by Scott Ambler (see "Enrollment" association in link below) and seems to justify the original cardinality.
http://www.agilemodeling.com/artifacts/classDiagram.htm

Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic