Author Topic: Relationship directionality and verbs  (Read 6808 times)

PDC

  • EA User
  • **
  • Posts: 90
  • Karma: +4/-0
  • Systems Engineer
    • View Profile
Re: Relationship directionality and verbs
« Reply #15 on: June 25, 2024, 01:11:33 am »
With respect, I believe the composition relationship is not as you describe it.  You may be confusing the classifier with the instance.  You are correct in asserting that destroying (not deleting - more later) the Car classifier doesn't destroy the Wheel classifier.  However, at the instance level, if the wheel is attached to the car, it must be destroyed with the car (think "nuked")!  However, the wheel may be detached from the car (and therefore no longer participates in the composition) then it survives.

This is the essential difference between composite aggregation (aka "Composition") and shared aggregation (aka "Aggregation").  Aggregation is like Team membership, you can destroy the team without destroying the players.  Also, a player can be in more than one team at the same time whereas the wheel can only be on one car at a time.  The other distinguishing mechanism for which type of "holonymy is in play".

As I said, I treat every day as a school day. Looks like I need to go back to class, or at least wake up properly before posting.
I'd love to understand the philosophical aspects of all this a whole lot better. For one thing, the subtle difference between 'delete' and 'destroy' which I had never really understood properly.

*Could* you say that the 'car/wheel' Relationship can be described as both Aggregation AND Composition when considering either classifiers or instances? i.e.
> Aggregation in that there is not really any such thing as a 'car', that's just what you end up with by collecting (aggregating) enough bits and pieces (including, but not limited to, Wheels) together and attaching them in the right order. But any one of those pieces (e.g. 'Wheel' or 'Chassis') can exist perfectly well on its own without having to be 'Part of a Car'
> Composition in that once you destroy an instance of a Car, all of its constituent Parts (e.g. its 'wheel' instances) are also considered destroyed

At one point I thought I understood these concepts but now I'm not so sure...



Also major apologies for hijacking the thread, happy to continue this privately unless it is useful to other people too?!
Phil

PDC

  • EA User
  • **
  • Posts: 90
  • Karma: +4/-0
  • Systems Engineer
    • View Profile
Re: Relationship directionality and verbs
« Reply #16 on: June 25, 2024, 09:03:56 pm »
Have slept on this and I think I'm overthinking it. I think.
The reason I'm having a hard time coming to a clear conclusion is because the problem I'm tackling at work has multiple viewpoints, from which Aggregation or Composition could variably make sense.
It relates heavily to my thread in a different sub-forum so I'll stop hijacking this one and I'll take the discussion over there to keep it all in once place.

https://sparxsystems.com/forums/smf/index.php/topic,48546.msg281535.html#new
Phil

Roche Pso

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-1
    • View Profile
Re: Relationship directionality and verbs
« Reply #17 on: June 26, 2024, 06:29:34 pm »
Composition implies ownership, aggregation is usage

In both the car wheel and team player examples the relationship is aggregation as the wheel and player are not owned by the car/team, they are just used by it. They could be used by a different car/team.

A bodyshell is owned by the car as it has no life outside being part of that car, so it is a composition

The way Ikea sell tables as individual tops and legs that can be mixed and matched together by the buyer is aggregation. A place that sells assembled tables that do not share leg or top types is composition

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13288
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Relationship directionality and verbs
« Reply #18 on: June 26, 2024, 06:46:22 pm »
A major difference that has been overlooked here is the "shared" part.

There are two aggregationKinds in UML:

Composite Aggregation a part can only belong to one whole at a certain moment in time. (and will be destroyed with the whole if not detached)
Shared Aggregation a part can belong to many wholes at the same time. When a whole is destroyed all parts remain.

Geert

PDC

  • EA User
  • **
  • Posts: 90
  • Karma: +4/-0
  • Systems Engineer
    • View Profile
Re: Relationship directionality and verbs
« Reply #19 on: June 26, 2024, 07:20:00 pm »
Composite Aggregation a part can only belong to one whole at a certain moment in time. (and will be destroyed with the whole if not detached)
Shared Aggregation a part can belong to many wholes at the same time. When a whole is destroyed all parts remain.

This bit seems critical and is certainly very useful to me in understanding the difference.
Thankyou for these clarifications!
Phil

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1088
  • Karma: +28/-8
    • View Profile
Re: Relationship directionality and verbs
« Reply #20 on: July 03, 2024, 03:46:25 am »
When I started this thread I had the following quote in mind

“ArchiMate is based on a grammar similar to natural language (subject|verb|object) to describe what people or "things" do, and adds an external, service oriented, view of those activities.” (From https://archimate-community.pages.opengroup.org/workgroups/archimate-101/)

Whether the subject|verb|object metaphor also applies to UML is something that I have not yet explored.

The implication of the subject|verb|object metaphor is:
1. The subject is the source,
2. The verb/verbs is the connector, and
3. The object is the target.

To construct the sentence A car (subject) consists of (verb) wheels (object). We need to put “car” as the source and “wheel” as the target of an aggregation relationship, with, if I am not mistaken, the diamonds on the car side. This is counter intuitive and I am not sure Sparx EA works this way.

In other words, at least, with ArchiMate, it should be possible to convert each pair of related elements into a subject|verb|object sentence.

PDC

  • EA User
  • **
  • Posts: 90
  • Karma: +4/-0
  • Systems Engineer
    • View Profile
Re: Relationship directionality and verbs
« Reply #21 on: July 03, 2024, 05:48:06 pm »
The implication of the subject|verb|object metaphor is:
1. The subject is the source,
2. The verb/verbs is the connector, and
3. The object is the target.

To construct the sentence A car (subject) consists of (verb) wheels (object). We need to put “car” as the source and “wheel” as the target of an aggregation relationship, with, if I am not mistaken, the diamonds on the car side. This is counter intuitive and I am not sure Sparx EA works this way.

I agree with your logic here, and also agree that this makes it look A Bit Weird - i.e. the diamond ends up at the source end of the Aggregation connector, which doesn't immediately seem logical with a directed Relationship.
Maybe I spent too long in the past thinking about UML Interfaces, but somehow I approach each directed Relationship as "a directed Relationship consists of one thing that needs something (the 'required' interface / the target) to another thing that provides that needed thing (the 'provided' interface / the source)". In that case, you could argue that our sentence reads "A wheel belongs to a car" (i.e. the car is providing context for the wheel to be a meaningful part of something bigger). It's maybe a bit of a stretch, and certainly doesn't read so well in English as your original sentence "A car consists of wheels".
Phil