Author Topic: Relationship between/to Attributes  (Read 1483 times)

TomT

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Relationship between/to Attributes
« on: December 01, 2017, 06:59:27 am »
Hi everyone!

Bear with me, as I am somewhat inexperienced with EA.

I have defined a set of Data Entities as a Class type, with the Attributes representing the fields associated with the entity. So far, seems like the right way of doing things.

I am now looking to be able to model the data handling for a set of interfaces. What I would like to be able to do is to create a connection between Entity A.name and Entity B.name. It seems this would be easy to accomplish using a Relationship Matrix, but I don't seem to be able to get the Attributes as either a source or a target in the matrix. It seems to be restricted to elements. Am I expecting too much?

In the same way, I would like to be able to report on relationships between my Attributes and my System Use Cases, where a specific use case uses or modifies Entity A.name. I can model this (somewhat) by associating the Entity with the Use Case and attaching the connector to an Element Feature (the Attribute). The problem I have with this method is that I need to create a separate connection for each Attribute (a lot of work!).

One thing I can do, is to model the interaction between the Entity and the Use Case and suppress the Attributes which are not used using the Features & Visibility functionality. While that makes a nice diagram, I don't seem to be able to reproduce that in an extract document. (Note that I am using eaDocX to generate documents, and they have already indicated that they don't have this functionality available.)

Going the route of making individual connections for each Attribute/field, allows me to get what I need (sort of), but I'm not sure it's worth the work.

Anyone have any suggestions (particularly using the Relationship Matrix, if that's possible)?

Thanks!!

Tom

qwerty

  • EA Guru
  • *****
  • Posts: 9205
  • Karma: +140/-132
  • I'm no guru at all
    • View Profile
Re: Relationship between/to Attributes
« Reply #1 on: December 01, 2017, 08:12:40 am »
You can associate attributes in that way only in a diagram. Place both entities side by side and create an association between them. Now click near one of them and choose Link to Element Feature. Choose Attribute from the drop down. Do the same from the other side. Now you have (visually) connected two attributes.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1197
  • Karma: +91/-6
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Relationship between/to Attributes
« Reply #2 on: December 01, 2017, 07:58:48 pm »
Hi Tom, and welcome to the forum.

Am I expecting too much?

In brief: yes.

This isn't an EA issue, but the way UML works: Attributes Do Not Have Relationships.

EA has a function called "link to element feature," with which you can fake connections to attributes and operations (which is what qwerty's talking about and something you've already tried). However, this is mainly visual. Crucially, these fake (well, semi-fake) attribute connections are not available to other core functions like basic document generation or relationship matrices: these functions only see relationships between elements (classes, components, etc).

That said, the semi-fake links are stored in the database (every EA project is a database, even an .EAP file) and it is quite possible for a skilled document template wizard to create an advanced template which pulls that information out of there. But in order to get that done, the wizard would need a complete understanding of what else you want in your document -- a requirement spec, in other words.

I don't think you could get attribute links to work in a relationship matrix. With document templates, it's possible to use "template fragments" which can query the database directly, but that option is not available to relationship matrices.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6279
  • Karma: +52/-5
    • View Profile
Re: Relationship between/to Attributes
« Reply #3 on: December 04, 2017, 08:44:04 am »
This isn't an EA issue, but the way UML works: Attributes Do Not Have Relationships.
Not quite true. Dependency, some of its specializations and Information Flow all go between Named Elements, which includes Attributes.

On the other hand, UML doesn't define a notation for rendering relationships between the attributes of a class. (Although, it's not incorrect to render it as a Port or Part to show the relationships.)
Simon

support@sparxsystems.com

TomT

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Relationship between/to Attributes
« Reply #4 on: December 12, 2017, 06:06:39 pm »
Thanks, guys!

I appreciate the information.

Marc Vanstraelen

  • EA User
  • **
  • Posts: 37
  • Karma: +5/-0
    • View Profile
Re: Relationship between/to Attributes
« Reply #5 on: January 25, 2018, 11:22:07 pm »
Quote
EA has a function called "link to element feature," with which you can fake connections to attributes and operations (which is what qwerty's talking about and something you've already tried). However, this is mainly visual. Crucially, these fake (well, semi-fake) attribute connections are not available to other core functions like basic document generation or relationship matrices: these functions only see relationships between elements (classes, components, etc).

For document generation, it is possible to include linked element features in the RTF template by checking the "Linked Feature" under the Source or Target of a Connector. I used this to document links from screen elements to class attributes.

Richard Freggi

  • EA User
  • **
  • Posts: 61
  • Karma: +3/-1
    • View Profile
Re: Relationship between/to Attributes
« Reply #6 on: January 26, 2018, 07:44:21 am »
Thank you for your insightful post Simon.
For my own education: about this
"UML doesn't define a notation for rendering relationships between the attributes of a class. (Although, it's not incorrect to render it as a Port or Part to show the relationships."

Understood re. diagramming.  In practical terms, my assumption would be that if some element has a real association with something else, then both elements are classes (i.e. the attributes having the relations are in fact classes on their own right).   Would there be a realistic practical situation where such a relationship exists between non-class elements?  In some programming language or some practical application. 

This isn't an EA issue, but the way UML works: Attributes Do Not Have Relationships.
Not quite true. Dependency, some of its specializations and Information Flow all go between Named Elements, which includes Attributes.

On the other hand, UML doesn't define a notation for rendering relationships between the attributes of a class. (Although, it's not incorrect to render it as a Port or Part to show the relationships.)

qwerty

  • EA Guru
  • *****
  • Posts: 9205
  • Karma: +140/-132
  • I'm no guru at all
    • View Profile
Re: Relationship between/to Attributes
« Reply #7 on: January 26, 2018, 08:24:52 am »
A common use is attribute mapping. You have two similar objects (e.g. two different representations of Person coming from two different companies). Now you want to map the foreign attributes to that of your own object.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6041
  • Karma: +73/-83
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Relationship between/to Attributes
« Reply #8 on: January 29, 2018, 10:52:37 am »
A common use is attribute mapping. You have two similar objects (e.g. two different representations of Person coming from two different companies). Now you want to map the foreign attributes to that of your own object.

q.
+1  This appears to be the most common use case (Attribute mapping) we use it also for attribute tracing (again, a form of mapping) in generation processes.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Richard Freggi

  • EA User
  • **
  • Posts: 61
  • Karma: +3/-1
    • View Profile
Re: Relationship between/to Attributes
« Reply #9 on: January 30, 2018, 05:43:14 am »
Thank you Paolo and qwerty for the info!