Version 3.1 by Helena on 2025/05/19 23:53

Show last authors
1 = {{id name="_Toc371088"/}}14 Appendix 1: A Short Guide To UML in the SDMX Information Model =
2
3 == {{id name="_Toc371089"/}}14.1 Scope ==
4
5 The scope of this document is to give a brief overview of the diagram notation used in UML. The examples used in this document have been taken from the SDMX UML model.
6
7 == {{id name="_Toc371090"/}}14.2 Use Cases ==
8
9 In order to develop the data models it is necessary to understand the functions that require to be supported. These are defined in a use case model. The use case model comprises actors and use cases and these are defined below.
10
11 The **actor** can be defined as follows:
12
13 “//An actor defines a coherent set of roles that users of the system can play when interacting with it. An actor instance can be played by either an individual or an external system”//
14
15 The actor is depicted as a stick man as shown below.
16
17 [[image:SDMX_2-1_SECTION_2_InformationModel_2020-07_66e2f2ec.gif||alt="Shape26" height="50" width="37"]]
18
19 Data Publisher
20
21 **Figure 46 Actor**
22
23 The **use cas**e can be defined as follows:
24
25 “//A use case defines a set of use-case instances, where each instance is a sequence of actions a system performs that yields an observable result of value to a particular actor”//
26
27 [[image:SDMX_2-1_SECTION_2_InformationModel_2020-07_562c117a.gif||alt="Shape27" height="46" width="80"]]
28
29 Publish Data
30
31 **Figure 47 Use case**
32
33 [[image:SDMX_2-1_SECTION_2_InformationModel_2020-07_5cee3cf7.gif||alt="Shape28" height="40" width="290"]]
34
35 Publish Data Data Publisher
36
37 **Figure 48 Actor and use case**
38
39
40
41 (((
42 ~>>
43
44 extend
45
46 <<
47
48 Uses Data
49
50 Data Consumer
51
52 [[image:SDMX_2-1_SECTION_2_InformationModel_2020-07_68a03392.gif||alt="Shape29" height="171" width="283"]]
53 )))
54
55 Metadata Uses Reference Metadata
56
57 Consumer
58
59 **Figure 49 Extend use cases**
60
61 An extend use case is where a use case may be optionally extended by a use case that is independent of the using use case. The arrow in the association points to he owning use case of the extension. In the example above the Uses Data use case is optionally extended by the Uses Metadata use case.
62
63 == {{id name="_Toc371091"/}}14.3 Classes and Attributes ==
64
65 === {{id name="_Toc371092"/}}14.3.1 General ===
66
67 A class is something of interest to the user. The equivalent name in an entity-relationship model (E-R model) is the entity and the attribute. In fact, if the UML is used purely as a means of modelling data, then there is little difference between a class and an entity.
68
69 **Figure 50 Class and its attributes**
70
71 Figure 50 shows that a class is represented by a rectangle split into three compartments. The top compartment is for the class name, the second is for attributes and the last is for operations. Only the first compartment is mandatory. The name of the class is Annotation, and it belongs to the package SDMX-Base. It is common to group related artefacts (classes, use-cases, etc.) together in packages. . Annotation has three “String” attributes – name, ,,type,,, and ,,url,,. The full identity of the attribute includes its class e.g. the name attribute is Annotation.name.
72
73 Note that by convention the class names use UpperCamelCase – the words are concatenated and the first letter of each word is capitalized. An attribute uses lowerCamelCase - the first letter of the first (or only) word is not capitalized, the remaining 2469 words have capitalized first letters.
74
75 === {{id name="_Toc371093"/}}14.3.2 Abstract Class ===
76
77 An abstract class is drawn because it is a useful way of grouping classes, and avoids drawing a complex diagram with lots of association lines, but where it is not foreseen that the class serves any other purpose (i.e. it is always implemented as one of its sub classes). In the diagram in this document an abstract class is depicted with its name in italics, and coloured white.
78
79 **Figure 51 Abstract and concrete classes**
80
81 == {{id name="_Toc371094"/}}14.4 Associations ==
82
83 === {{id name="_Toc371095"/}}14.4.1 General ===
84
85 In an E-R model these are known as relationships. A UML model can give more meaning to the associations than can be given in an E-R relationship. Furthermore, the UML notation is fixed (i.e. there is no variation in the way associations are drawn). In an E-R diagram, there are many diagramming techniques, and it is the relationship in an E-R diagram that has many forms, depending on the particular E-R notation used.
86
87 === {{id name="_Toc371096"/}}14.4.2 Simple Association ===
88
89 **Figure 52 A simple association**
90
91 Here the ,,DataflowDefinition,, class has an association with the DataStructureDefinition class. The diagram shows that a DataflowDefinition can have an association with only one ,,DataStructureDefinition,, (1) and that a DataStructureDefinition can be linked to many DataflowDefinitions (0..*). The association is sometimes named to give more semantics.
92
93 In UML it is possible to specify a variety of “multiplicity” rules. The most common ones are:
94
95 1.
96 1*. Zero or one (0..1)//&nbsp;//
97 1*. Zero or many (0..*)//&nbsp;//
98 1*. One or many (1..*)//&nbsp;//
99 1*. Many (*)//&nbsp;//
100 1*. Unspecified (blank)//&nbsp;//
101
102 === {{id name="_Toc371097"/}}14.4.3 Aggregation ===
103
104 **Figure 53: A simple aggregate association**
105
106 **Figure 54 A composition aggregate association**
107
108 An association with an aggregation relationship indicates that one class is a subordinate class (or a part) of another class. In an aggregation relationship. There are two types of aggregation, a simple aggregation where the child class instance can outlive its parent class, and a composition aggregation where the child class's instance lifecycle is dependent on the parent class's instance lifecycle. In the simple aggregation it is usual, in the SDMX Information model, for this association to also be a reference to the associated class.
109
110 === {{id name="_Toc371098"/}}14.4.4 Association Names and Association-end (role) Names ===
111
112 It can be useful to name associations as this gives some more semantic meaning to the model i.e. the purpose of the association. It is possible for two classes to be joined by two (or more) associations, and in this case it is extremely useful to name the purpose of the association.
113
114 Figure 55 shows a simple aggregation between CategoryScheme and Category called ///items //(this means it is derived from the association between the super classes – in this case between the //ItemScheme// and the //Item,// and another between Category called ///hierarchy//.
115
116 **Figure 55 Association names and end names**
117
118 Furthermore, it is possible to give role names to the association-ends to give more semantic meaning – such as parent and child in a tree structure association. The role is shown with “+” preceding the role name (e.g. in the diagram above the semantic of the association is that a Item can have zero or one parent Items and zero or many child Item).
119
120 In this model the preference has been to use role names for associations between concrete classes and association names for associations between abstract classes. The reason for using an association name is often useful to show a physical association between two sub classes that inherit the actual association between the super class from which they inherit. This is possible to show in the UML with association names, but not with role names. This is covered later in “Derived Association”.
121
122 Note that in general the role name is given at just one end of the association.
123
124 === {{id name="_Toc371099"/}}14.4.5 Navigability ===
125
126 Associations are, in general, navigable in both directions. For a conceptual data model it is not necessary to give any more semantic than this.
127
128 However, UML allows a notation to express navigability in one direction only. In this model this “navigability” feature has been used to represent referencing. In other words, the class at the navigable end of the association is referenced from the class at the non-navigable end. This is aligned, in general, with the way this is implemented in the XML schemas.
129
130 **Figure 56 One way association**
131
132 Here it is possible to navigate from A to B, but there is no implementation support for navigatation from B to A using this association.
133
134 === {{id name="_Toc371100"/}}14.4.6 Inheritance ===
135
136 Sometimes it is useful to group common attributes and associations together in a super class. This is useful if many classes share the same associations with other classes, and have many (but not necessarily all) attributes in common. Inheritance is shown as a triangle at the super class.
137
138 **Figure 57 Inheritance**
139
140 Here the Dimension is derived from Component which itself is derived from
141
142 //IdentifiableArtefact//. Both Component and IdentifiableArtefact are abstract superclasses. The Dimension inherits the attributes and associations of all of the the super classes in the inheritance tree. Note that a super class can be a concrete class (i.e. it exists in its own right as well as in the context of one of its sub classes), or an abstract class.
143
144 === {{id name="_Toc371101"/}}14.4.7 Derived association ===
145
146 It is often useful in a relationship diagram to show associations between sub classes that are derived from the associations of the super classes from which the sub classes inherit. A derived association is shown by “/” preceding the association name e.g. ///name//.
147
148 **Figure 58 Derived associations**
149
150 [[1>>path:#sdfootnote1anc||name="sdfootnote1sym"]] OLAP: On line analytical processing
151
152 [[2>>path:#sdfootnote2anc||name="sdfootnote2sym"]] The Validation and Transformation Language is a standard language designed and published under the SDMX initiative. VTL is described in the VTL User and Reference Guides available on the SDMX website [[__https:~~/~~/sdmx.org__>>url:https://sdmx.org/]][[.>>url:https://sdmx.org/]]
153
154 [[3>>path:#sdfootnote3anc||name="sdfootnote3sym"]] Or a part of a Dataflow, see also the chapter “Validation and Transformation Language” of the Section 6 of the SDMX Standards (“SDMX Technical Notes”), paragraph “Mapping dataflow subsets to distinct VTL data sets”.
155
156 [[4>>path:#sdfootnote4anc||name="sdfootnote4sym"]] Provided that the VTL consistency rules are accomplished (see the “Generic Model for Transformations” in the VTL User Manual and its sub-section “Transformation Consistency”).
157
158 [[5>>path:#sdfootnote5anc||name="sdfootnote5sym"]] For example, the **check** operator produces some new components in the result called by default **bool_var**, **errorcode**, **errorlevel**, **imbalance**. These names can be personalised if needed.
159
160 [[6>>path:#sdfootnote6anc||name="sdfootnote6sym"]] SDMX Technical Notes, chapter “Validation and Transformation Language”, section “References to SDMX artefacts from VTL statements”.
161
162 [[7>>path:#sdfootnote7anc||name="sdfootnote7sym"]] For a more thorough description of these conversions, see the Section 6 of the SDMX Standards (“SDMX Technical Notes”), chapter “Validation and Transformation Language”, section “Mapping between SDMX and VTL”.
163
164 [[8>>path:#sdfootnote8anc||name="sdfootnote8sym"]] SDMX Technical Notes, chapter “Validation and Transformation Language”, section “Mapping dataflow subsets to distinct VTL data sets”.
165
166 [[9>>path:#sdfootnote9anc||name="sdfootnote9sym"]] Or a part of a Dataflow, as described in the previous paragraph.
167
168 [[10>>path:#sdfootnote10anc||name="sdfootnote10sym"]] The default conversion table from VTL to SDMX is described in the the Section 6 of the SDMX Standards
169
170 (“SDMX Technical Notes”), chapter “Validation and Transformation Language”, section “Mapping VTL basic scalar types to SDMX data types”.
171
172 [[11>>path:#sdfootnote11anc||name="sdfootnote11sym"]] About VTL internal and external representations, see also the VTL User Manual, section “Basic scalar types”, p.53.
173
174 [[12>>path:#sdfootnote12anc||name="sdfootnote12sym"]] See “Mapping VTL basic scalar types to SDMX data types” in the SDMX Technical Notes, chapter “Validation and Transformation Language”.
175
176 [[13>>path:#sdfootnote13anc||name="sdfootnote13sym"]] See “Mapping VTL basic scalar types to SDMX data types” in the SDMX Technical Notes, chapter “Validation and Transformation Language”.
177
178 [[14>>path:#sdfootnote14anc||name="sdfootnote14sym"]] See also the VTL formatting mask in the VTL Reference Manual and the SDMX Technical Notes.
179
180 [[15>>path:#sdfootnote15anc||name="sdfootnote15sym"]] See “Mapping VTL basic scalar types to SDMX data types” in the SDMX Technical Notes, chapter “Validation and Transformation Language.