This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

SCEA part 2. Strange domain model

 
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
 
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).
 
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.
reply
    Bookmark Topic Watch Topic
  • New Topic