Book a Demo

Author Topic: How to make references between attributes?  (Read 6928 times)

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
How to make references between attributes?
« on: January 31, 2019, 05:47:33 am »
Any good tips on how to make references between attributes (across) elements?

One option, of course, would be to create connectors between them ('link to feature') - but that will totally clutter our model - so that option is out (unless I have missed some way to filter them out from diagrams and miscellaneous windows (relationships, insert related …)

Another option would be to create shadow elements for all the attributes that I want to link to and then choose such an element in the type property for the referring attribute - but again clutter …  - so that one is out too.

A third option is DOA: Creating special reference tags that refer to attributes in stead of to classes - is not possible anyway.

The fourth option - which I'm considering - is creating an attribute tag, that holds ea_guid of the referred attribute -  but that will not be user-friendly in the EA gui, since it will only show a guid. I would probably create an accompanying tag that shows fx the name of the referred tag, and its parent element - and then keep that synchronized. I would also have to create a GUI to maintain such references.

hmmm - it would be great to hear tips from you on a better solution … ???



« Last Edit: January 31, 2019, 05:52:29 am by Svend Erik Nygaard »

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: How to make references between attributes?
« Reply #1 on: January 31, 2019, 07:32:43 am »
It depends on what level of your model you are operating in.  Generally when I map attributes to each other I have a class that represents part of a data schema so I use option 1 on very specific diagrams.

If I was at the logical or conceptual level I would do something else.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to make references between attributes?
« Reply #2 on: January 31, 2019, 08:53:31 am »
I'd probably go the first way and arrange for showing the element mapping only in one specific diagram.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to make references between attributes?
« Reply #3 on: January 31, 2019, 11:07:41 am »
Any good tips on how to make references between attributes (across) elements?

[SNIP]

A third option is DOA: Creating special reference tags that refer to attributes in stead of to classes - is not possible anyway.

The fourth option - which I'm considering - is creating an attribute tag, that holds ea_guid of the referred attribute -  but that will not be user-friendly in the EA gui, since it will only show a guid. I would probably create an accompanying tag that shows fx the name of the referred tag, and its parent element - and then keep that synchronized. I would also have to create a GUI to maintain such references.

hmmm - it would be great to hear tips from you on a better solution … ???

Hi Svend,
Have you tried the RefGuid tag type?

They seem to be what you are after for 3 & 4. 
Use
Type=RefGuid;
Values=Attribute;

You can search or browse for the attribute to reference.  EA supplies the name of the attribute in the Tagged Values window.  Since you can't see attribute tags on the diagram, there is no loss of generality.
The value stored in the DB is the GUID of the attribute.

HTH,
Paolo
« Last Edit: January 31, 2019, 11:09:38 am by Paolo F Cantoni »
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: 498
  • Karma: +18/-7
    • View Profile
Re: How to make references between attributes?
« Reply #4 on: January 31, 2019, 01:44:36 pm »
Svend can you elaborate on your goal?

If it's a class diagram, public attributes are public and private attributes are private.  In any case it's the operations that can change the attribute values.

If it's a data model in UML, if it's at conceptual level it should have very few or no attributes; and if it's logical it should be normalized (attributes depend entirely and only on the table-class primary key)

What is the scenario where you would need to include dependencies between attributes in your model?
« Last Edit: January 31, 2019, 09:35:44 pm by Richard Freggi »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to make references between attributes?
« Reply #5 on: January 31, 2019, 03:35:50 pm »
We use these RefGuid tagged values mainly to document mapping between different model (e.g. xml message model to Logical Data Model)

I even made an add-in to support mapping between models that uses RefGuid tagged values entirely

Geert

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: How to make references between attributes?
« Reply #6 on: February 01, 2019, 01:39:16 am »
Thanks a lot, you guys, for a lot of response.

Somehow, I had erroneous concluded that I could only create RefGuid tags that referred to objects (not to attributes).
Paolo's and Geert's response made me check up on that - and happy news (for me :-) ) - it was actually possible (not DOA).

Like Geert, we will reference from messages to our conceptual model (in our case we have one conceptual which also makes up for the logical data model).

However we will not map only messages - we will map any implementation model (including DB schema, APIs, GUIs etc) to the concept model (where relevant).
In that regard, I have a challenge when using other MDGs like datmodel MDG with table column stereotypes. These are great for reverse engineering - but I cannot expand these existing MDGs (e.g. table column) to include the new RefGuid tag (or ...?).
I guess it would be possible to modify the relevant MDG XML file (and remember to re-modify them when we receive new MDG versions - but arrgghhh - right?)

@Geert, the plugin that you made, does that support adding such RefGuid tags to e.g. table column? - for instance by letting the plugin itself add such tags when needed?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to make references between attributes?
« Reply #7 on: February 01, 2019, 02:05:19 am »
@Geert, the plugin that you made, does that support adding such RefGuid tags to e.g. table column? - for instance by letting the plugin itself add such tags when needed?

Yes, it creates its own tagged values.
Here's a link to the current, not yet published version (together with the rest of the toolpack)
https://drive.google.com/open?id=17cFKgiFmIi5Rr41j_jnYCQSiNqT_3pgk
I didn't have time yet to write any documentation though. Should be added to the website in a couple of weeks

Geert