Say I had three types of vehicle, which are all related by some similar attributes.
What is the best way to show these relationships?
Say I had three types of vehicle, which are all related by some similar attributes.
What is the best way to show these relationships?
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: