1

Say I had three types of vehicle, which are all related by some similar attributes.

enter image description here

What is the best way to show these relationships?

Christophe
  • 68,716
  • 7
  • 72
  • 138
92carmnad
  • 122
  • 7

1 Answers1

1

In traditional entity-relationship diagrams such a relation between attributes is not shown. This notation is exclusively reserved for foreign keys to primary keys relationships. For example if you would have a Manufacturer entity with a (unique) Id attribute, you could then relate a new attribute Car manufacturer id to it to show to what entity it refers.

In an enhanced ERD, you could use the IsA relationship and move the common attributes to a separate entity called Vehicle. The IsA relationship would then mean that the same attributes are inherited by the inheriting entities. But your example is not straight forward, since a Boat has no Number of wheels. So you'd need to further add a Rolling vehicle entity, making the diagram very complex.

Very pragmatically, you could:

  • Use the same attribute name for the same kind of information.
  • Use a data dictionary describing each unique attribute in a generic way applicable to all teh entities that use it.
  • Or graphically use some dotted connector between common attributes (instead of the plain lines which are confusing)
  • Or, if the similar entities are close on the diagram, draw colored horizontal boxes surrounding groups of identical attributes.
Christophe
  • 68,716
  • 7
  • 72
  • 138