-
Key: UML24-67
-
Legacy Issue Number: 15369
-
Status: closed
-
Source: Adaptive ( Mr. Pete Rivett)
-
Summary:
This is one of two structural extensions added to UML by MOF, which if incorporated into UML would allow (constrained) Superstructure models to be used as MOF metamodels.
Regardless of MOF, it is a fundamental capability missing from UML in being able to model various data structures for languages such as SQL and XML Schema which all have the notion of identifier.
Although MOF restricts classes to have only one Property with isId = true, for generality the proposal does not restrict this in UML.
Should this issue be applied to UML, a mirror issue will be applied to MOF.
Proposed Resolution:
Superstructure
Add the following to the Attributes section of 7.3.44, Property:
isID: Boolean [0..1] - True indicates this property can be used to uniquely identify an instance of the containing Class.
Add the following to the end of the Semantics section of 7.3.44, Property, immediately before the sub-heading ‘Package AssociationClasses’:
A property may be marked as being (part of) the identifier (if any) for classes of which it is a member. The interpretation of this is left open but this could be mapped to implementations such as primary keys for relational database tables or ID attributes in XML. If multiple properties are marked (possibly in superclasses) then it is the combination of the (property, value) tuples that will logically provide the uniqueness for any instance. Hence there is no need for any specification of order and it is possible for some (but not all) of the property values to be empty. If the property is multivalued then all values are included.
Replace the following in the definition of <prop-modifier> in the Notation section of 7.3.44, Property:
‘redefines’ <property-name> | ‘ordered’ | ‘unique’ | ‘nonunique’ | <prop-constraint>
With:
‘redefines’ <property-name> | ‘ordered’ | ‘unique’ | ‘nonunique’ | ‘id’ | <prop-constraint>
Add the following line before that defining <prop-constraint>:
· id means that the property is part of the identifier for the class
Update Figure 7.12 to include isID : Boolean[0..1] in class Property
Update the definition of the attribute ‘qualifiedName’ in section 7.3.33, NamedElement, from:
/ qualifiedName: String [0..1]
To:
/ qualifiedName: String [0..1]
{id}Infrastructure
Add the following to the Attributes section of 10.2.5, Property:
isID: Boolean [0..1] - True indicates this property can be used to uniquely identify an instance of the containing Class.
Add the following to the end of the Semantics section of 10.2.5, Property:
A property may be marked as being (part of) the identifier for classes of which it is a member. The interpretation of this is left open but this could be mapped to implementations such as primary keys for relational database tables or ID attributes in XML. If multiple properties are marked (possibly in superclasses) then it is the combination of the (property, value) tuples that will logically provide the uniqueness for any instance. Hence there is no need for any specification of order and it is possible for some (but not all) of the property values to be empty. If the property is multivalued then all values are included.
Replace the following in the definition of <prop-modifier> in the Notation section of 11.3.5, Property:
‘redefines’ <property-name> | ‘ordered’ | ‘unique’ | <prop-constraint>
With:
‘redefines’ <property-name> | ‘ordered’ | ‘unique’ | ‘id’ | <prop-constraint>
Add the following line before that defining <prop-constraint>:
· id means that the property is part of the identifier for the class
Update Figures 10.3 and 11.5 to include isId : Boolean[0..1] in class Property
-
Reported: UML 2.3 — Tue, 13 Jul 2010 04:00 GMT
-
Disposition: Resolved — UML 2.4
-
Disposition Summary:
Add the proposed property.
-
Updated: Fri, 6 Mar 2015 20:58 GMT