ADOxx Documentation
Theory - Hands-On - Scenarios - Community - Development Tools
Theory
Class cardinality
The class attribute "Class cardinality" contains the cardinality definition of the current class. The cardinality of a class describes
- the minimal/maximal number of objects of this class per model
- the minimal/maximal number of relations of a specific type, incoming or outgoing from the object
If no cardinalities are defined then there are no restrictions for this class.
Commands of the Class Cardinality
CARDINALITIES
The cardinality definition must start with this command to be valid. It has no parameters.
RELATION "RelationName"
Restricts the following commands to the relation class with the name <RelationName>.
FROM_CLASS "ClassName" / TO_CLASS "ClassName"
Restricts the following commands to relations with the class of <ClassName>
Parameters of the Class Cardinality
min-objects / max-objects
Specifies how many objects of a class can minimally/maximally be available in the model.
min-relations / max-relations
Specifies the minimal/maximal number of relations which can be connected with this object from this class.
max-outgoing / min-outgoing / max-incoming / min-incoming
Restricts the number of allowed incomming/outgoing relations, either:
- in general or
- with a preceding RELATION command only for this relation or
- with a preceding FROM_CLASS or TO_CLASS command only for relations to these classes.