UML profiles are lightweight mechanism for its extensions that do not make additions to the UML metamodel, on the contrary to heavyweight extensions requiring for adaptation of model repository interfaces (e.g. JMI interfaces) and interchange formats (e.g. XMI schema's). UML profile is a collection of stereo-types (possibly having tagged values as their attri-butes) and constraints. Using of profiles is based on the relationships between model elements and stereo-types; it may aim at highlighting the semantics of particular model and/or processing it in a special way. Many standard and non-standard UML profiles are proposed; nevertheless there is a need for precise representation of concepts aiming at development of models of state and behaviour of information systems. In this paper, the main attention is given to modelling that leads to development of data models and schemas of databases, though integrity constraints described as invariants of UML models considered here may evenly be realized by functionality of database as soon as operations of programming language.
A stereotype defines how an existing metaclass may be extended, and enables the use of platform or domain specific terminology or notation in place of or in addition to the ones used for the extended metaclass 0. Just like a class, a stereotype may have properties, which may be referred to as tag definitions. When a stereotype is applied to a model element, the values of the properties may be referred to as tagged values. Any UML model element can be extended by one or more stereotypes. In conceptual modelling of constraints, stereotypes are applied for constrained elements. Constrained elements of conceptual model may have more than one constraint and, consequently, more than one stereotype. For example, a referential attribute may comprise the part of primary key. Stereotypes may comprise hierarchy. In UML 2.0, it is possible to omit the symbol or label of stereotype in
Abstract. Integrity constraints are incident part of conceptual models, including part of semantics of problem domain. Analysis of the most important methods of conceptual modelling has revealed that none of them analyze the complete set of integrity const
E.Miliauskait , L.Nemurait
visual representation and to use tagged values (diffe-rently from the earlier versions, tags now cannot exist without stereotypes). When applying stereotypes to constraints, in some cases it is advisable to replace the stereotype with the value of tag, so we omit labels of stereotypes and attach tagged values to constrained elements. The tags and tagged values are concatenated for compact representation. Further, as tagged values are (meta) attributes, they may be typed and their values may be derived on the base of standard or cus-tomer defined types of UML model. For example, in 0 the Tag Value Language is proposed as a subset of Perl language for calculating the values of tags. Our work demonstrates how OCL expressions may be used on metamodelling level for definition of profile-related constraints and tagged values in cases when they must be derived from model elements.
4. Integrity constraints on attribute or attributes
Primary identifier is used for unique identification of instance of class (object of object type) among set of all objects of the same type 0, 0, 0. It requires that identifying attribute or attributes group always would have values and that values would be unique. UML does not have special graphical notation for capturing primary identifier constraints, because in object-oriented methodology it is assumed that every class is
Country
countryCode{P} : String
partOfPersonCode{EU1} : Stringname : String
R11
0..n
supported with object identifier (oid), e.g. a memory address assigned by system 0. However, we need visible, attribute-based identifier, defining existence of individuals in problem domain, and these identifiers must be presented in conceptual model. Alternative identifier or oid could be introduced in im-plementation phase, but nevertheless creation of new objects must be restricted by primary identifier const-raint. The primary identifier should be used in concep-tual model to capture all the conceptual semantics about a class. To do this we need to introduce exten-sions to the UML notation. Halpin 0, 0 suggested marking identifying attributes with constraint {P} (Figure 4). The primary identifier in conceptual model does not force to use these attributes as primary key in database, but it sets business requirement that primary identification (and, consequently, uniqueness) of object might be based on this property. If primary identifier was not defined, by default it would be arti-ficial identifier (oid) generated by system (Figure 4). UML provides the Object Constraint Language (OCL) for definition of constraints. OCL expression for constraint of primary identifier comprised of attributes c1,…,cn for object type A :
context A
inv: self Æ exists
(a1,a2:A|a1.c1=a2.c1,…,= implies a1=a2)