You are right
Entity - Tyres Attribute - NumberOfTyres (COMPLEX ATTRIBUTE?) - TypeBrand[0..*]
Express the fact that a "Types" object could have multiple "Typebrand".
Regards,
BR
Question
Just had to look into "Complex Attributes", admittedly I'm not an expert when it comes to this area but I was just wondering if this was in fact a correct "Complex Attribute" however pathetic is may be deemed. (I'm just trying to grasp basic knowledge for now!). Just found out I can't post pictures so... Here goes.
Entity - Car.
Attribute - RegNum
Attribute - Year
Entity - Tyres
Attribute - NumberOfTyres
(COMPLEX ATTRIBUTE?) - TyreBrand[0..*]
Insinuating the tyres could have multiple brands?
Regards.
Solution
You are right
Entity - Tyres Attribute - NumberOfTyres (COMPLEX ATTRIBUTE?) - TypeBrand[0..*]
Express the fact that a "Types" object could have multiple "Typebrand".
Regards,
BR
OTHER TIPS
The UML spec makes no mention of "complex attribute"; however, the multiplicity expressed within square brackets in TyreBrand[0..*]
is indeed the way to specify that a Tyre
can have zero or more TyreBrand
values.
Be careful with your terminology, though. When one uses the term "complex attribute", it usually describes whether an attribute's type has a simple or complex structure. For example, a phone number can be stored as a scalar String
value (e.g., "+1 800-555-5555") or as a complex Telephone Number
datatype with its own country code
, area code
, exchange
, and station
attributes of type String
(e.g., "+1", "800", "555", "5555"). Just to be clear, a Telephone Number
datatype would look like a class on a diagram, but with the «datatype» keyword at the top. It can be used as an attribute type instead of String
.