Book a Demo

Author Topic: ERD - Associate attribute with Relationship  (Read 5191 times)

Anthony Byrne

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
ERD - Associate attribute with Relationship
« on: April 16, 2012, 05:22:09 pm »
Newbie question.  In an ERD I have created two entities and a relationship between the two.  How do I add attributes to the relationship?

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: ERD - Associate attribute with Relationship
« Reply #1 on: April 17, 2012, 11:45:20 am »
You can add attributes to classes but not relationships. In the diagram right click and select "attributes" you get a dialog box up from where you can add attributes. Use New and Save buttons to add and update attributes to that class/entity.
I'm sure this is in the manual under Modelling Fundamentals>Elements>Attributes.
Ah yes here it is
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/modeling_basics/attributes.html

If you are thinking of changing the properties on the relationship such as cardinality i.e. one to many etc. then right click on relationship and select properties.

May be try reading the help next time ;) you might find what you are looking for there.




« Last Edit: April 17, 2012, 11:48:25 am by phenzell »
Happy to help
:)

Anthony Byrne

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ERD - Associate attribute with Relationship
« Reply #2 on: April 17, 2012, 03:50:01 pm »
Thanks.  I did read the help  ;)  It seems to show a relationship with an associated attribute.

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/domain_based_models/entity_relationship_diagrams_e.html

(if the img doesn't render look it up in the offline help .chm)

You've sent me a link for a Data Modelling Diagram.  I am creating an Entity Relationship Diagram.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: ERD - Associate attribute with Relationship
« Reply #3 on: April 18, 2012, 11:59:51 am »
Ah right I see where your coming from now. Some folk refer to data models as ERD's too so hence the confusion.

Looking at that example on wikipedia
http://en.wikipedia.org/wiki/File:ER_Diagram_MMORPG.png I see the example of the relationship between Character and Account has attributes attached and I guess that's the type of thing your trying to achieve.

Unfortunately the bad news is that the implementation of relationship in Sparx EA of ERD uses a connector underneath and as far as I'm aware you can't attach another connector. Thus thats why you can't connect attributes to relationships in an ERD. Can't blame you for falling into that trap. May be this is an implementation flaw of ERD by Sparx Systems? Anyway looking at the example ERD diagram in Sparx EA help (ver 8.0) it seems they use the N-ary association between projects and employees then connect an attribute to that N-ary association called hours. The N-ary association is implemented as an object underneath in the UML profile and you can attach connectors to objects.

Well hope that helps  :)

Good luck.
« Last Edit: April 18, 2012, 12:02:50 pm by phenzell »
Happy to help
:)

Anthony Byrne

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: ERD - Associate attribute with Relationship
« Reply #4 on: April 18, 2012, 03:07:22 pm »
The n-ary association works for my needs.  Thanks for taking time to look at this.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: ERD - Associate attribute with Relationship
« Reply #5 on: April 19, 2012, 06:46:26 am »
No problem happy to help.
Happy to help
:)