Database Reference
In-Depth Information
Figure 14: UML associations have two or more association roles
SOME OTHER ASPECTS OF
THE UML METAMODEL
UML class diagrams include many object-oriented implementation features, such as
attribute visibility and association navigability, and hence they surpass ER or ORM diagrams
for detailed design of object oriented code (e.g., Java or C# programs). However, UML class
diagrams currently lack standard notations for value-based identifi cation schemes (e.g.,
uniqueness constraints on attributes, and external uniqueness constraints between associa-
tion roles and/or attributes). This omission makes them less suitable for conceptual analysis,
because business people do communicate using such identifi cation schemes.
Figure 14 shows a fragment from the metamodel for the recently approved UML 2.0
(OMG, 2003). Roughly, a UML association corresponds to a fact type in ORM, and an
association end (here called “memberEnd”) corresponds to an ORM role. However, UML
associations must have at least two roles, so unary fact types need to be modeled in other
ways (e.g., using Booelan attributes or subtypes). This typically leads to formulations that
are less natural than unary sentences. For example, the fact instance that may be expressed
in ORM as “Person 'Sam Spade' smokes” would typically be rendered awkwardly in UML
as “SamSpade: Person
SamSpade: Person.isSmoker = true”. So while UML surpasses IE or Barker ER in its
ability to model n-ary associations directly, its lack of support for unaries still impedes
natural communication. Hopefully this restriction will be removed in some future version
of UML.
Figure 15: Exclusive-or constraints in ORM and UML
Search WWH ::




Custom Search