'Diagram vs Model - what information differs? [duplicate]
I am currently trying to understand the practical difference between diagrams and models, in the context of UML and BPMN, and came accross this statement:
"A UML model contains a lot of information, that are not necessarily shown in a diagram."
And I dont understand, what information is part of a model that is missing in a diagram?
Solution 1:[1]
The model can exist without any diagram. Of course, it would be much more cumbersome to edit the model by only using textbased dialogs, so most modelers will probably start with a diagram.
The content of the model can be shown in as many diagrams as you like and you can select what part of the information in the model you want to show. If a class has 10 attributes, you can choose to show only three. It is very good practice to only show the attributes relevant for the envisioned readers of the diagram.
There are also properties that don't have a notation, like the method defined for an operation or many derived properties. If you want to find out, whether a method has been assigned to an operation, you have to look in the model. Or if you want to find all the ownedElements of an element.
Solution 2:[2]
In a nutshell: diagrams are made from models in order to show them to humans (even not fluent in understanding UML).
P.S. Also see p. 681 of UML 2.5:
A UML model consists of elements such as packages, classes, and associations. The corresponding UML diagrams are graphical representations of parts of the UML model.
Solution 3:[3]
There are plenty of intersting answers here. But I’d like to contribute as well:
- a model is a simplified representation of some sort of (present or future) “reality”, such as a system for an UML model, or business processes for BPMN. The purpose is to better understand this “reality” and being able to reason on it (analysis, design) before implementing it or changing it.
- a diagram is a graphical representation of a part of a model.
So the model can be represented with many different diagrams that each show and focus on different aspects of the “reality”. Conversely, the model may aggregate many different aspects and relate them together (e.g an UML signal has a structure with attributes, can be sent or received by classes, can be exchanged as messages between objects, etc.) independently of any specific diagram.
This is not specific to UML or BPMN. Take for example a house. You'll discuss with an architect about a lot of things. In the head of the architect, a model will start to emerge. And the architect will draw many diagrams to represent this model and discuss it with you with a visual support: the front and side views let you imagine how it’ll look like; a view from above lets you understand how the house will be placed on the ground; some first sketches will enable arrangement of the rooms; a blueprint of a floor will provide all the detailed measures for the construction; some electrical schemas will tell how the wires are connected; etc.
Solution 4:[4]
UML defines a model as follows:
A model is always a model of something. The thing being modeled can generically be considered a system within some domain of discourse. The model then makes some statements of interest about that system, abstracting from all the details of the system that could possibly be described, from a certain point of view and for a certain purpose.
A model is an abstract notion, which can be represented by concrete notations, like diagrams, human-readable text or machine-readable files. The main representation defined by UML and BPMN is by means of diagrams, but the UML and BPMN specifications also define how to serialize a model in XML format.
One model may be represented by multiple diagrams. Each diagram represents a part of the model.
For example, a UML model of a relational database may be represented by multiple diagrams, where some tables are shown on one diagram and other tables are shown on another diagram. All the information contained in all these diagrams together form the model of the database.
There may be information about the model captured in a non-diagram format. If there is a mapping of this format to the UML/BPMN metamodel, one may consider that to be a representation of a (part of a) UML/BPMN model as well. However, for non-diagram formats the UML/BPMN standards refer to other standards like XMI.
Aside: In UML, there is a model element called Model. Such a Model is defined as a view on a physical system. In other words, you could make a UML model containing multiple Models, to indicate that you have multiple views of the same system. But this is not relevant for your question.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Axel Scheithauer |
| Solution 2 | |
| Solution 3 | |
| Solution 4 |
