IsabellaDec2018
IsabellaDec2018

Reputation: 21

what are all the uml data types including primitive types

This is a list of the data types for uml primitive types. What are all the uml data types? It doesn't have to be primitive types.

Boolean
Integer
UnlimitedNatural
String
Real

Upvotes: 2

Views: 3837

Answers (2)

qwerty_so
qwerty_so

Reputation: 36313

On p. 69 of UML 2.5 you will find

enter image description here

These literals have been defined to satisfy definitions used in the UML meta model itself (the section on this details these literals). You are free to add whatever you need on your own.

Datatypes are defined on p. 165:

enter image description here

UML makes use of PrimitiveType (any kind of formula) and Enumeration (like shown in www.admiraalit.nl's answer). However, to make a list of all of them would be exhaustive and pointless, I guess. Rather you would define your own DataTypes to your needs.

Upvotes: 3

www.admiraalit.nl
www.admiraalit.nl

Reputation: 6089

UML is a language to define your own classes, data types etc. Yes, UML defines some classes and data types itself, but only those needed to define UML.

The notion of DataType is defined in section 10.2 of the UML 2.5 specification. The primitive types you have mentioned are indeed data types defined by UML (in chapter 21). In addition, UML defines a number of enumerations. Primitive types and enumerations are both special kinds of data types. One example of an enumeration defined in UML is VisibilityKind (section 7.8.24).

enter image description here

UML does not define general purpose data types like Date other than the primitive types you have mentioned. If you want to use Date as a data type, you can define it in your model, or re-use an exisiting profile. Some teams using UML have a convention that standard data types from a particular programming language or database system can be used as data types in UML.

Upvotes: 2

Related Questions