Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity vs Datatype.

Similar presentations


Presentation on theme: "Entity vs Datatype."— Presentation transcript:

1 Entity vs Datatype

2 IPR Declaration Is there any IPR associated with this presentation NO
NOTICE: This contribution has been prepared to assist the ONF. This document is offered to the ONF as a basis for discussion and is not a binding proposal on Cisco or any other company. The requirements are subject to change in form and numerical value after more study. Cisco specifically reserves the right to add to, amend, or withdraw statements contained herein. THE INFORMATION HEREIN IS PROVIDED “AS IS,” WITHOUT ANY WARRANTIES OR REPRESENTATIONS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION, WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

3 OMG UML Specification “A DataType is a kind of Classifier. DataType differs from Class in that instances of a DataType are identified only by their value. All instances of a DataType with the same value are considered to be equal instances. If a DataType has attributes (i.e., Properties owned by it and in its namespace) it is called a structured DataType. Instances of a structured DataType contain attribute values matching its attributes. Instances of a structured DataType are considered to be equal if and only if the structure is the same and the values of the corresponding attributes are equal.”

4 DDD Entity vs Datatype Summary
Characteristic Entity Datatype Mutability Mutable attribute values Immutable attribute values Identity Immutable identifier added (Immutable) Attribute values # Equality Compare (immutable) identifier values Compare (immutable) attribute values # Uniqueness Unique identifier means every Entity can be distinguished Many datatypes may have the same attribute values and hence there is no real notion of uniqueness Changing an attribute value mutate in place create a new datatype with the required value and update the reference to point to it Valid as an Entity attribute type No Yes Valid as a Datatype attribute type Can be linked via associations Not incoming to a Datatype. Outgoing from a Datatype is possible to an Entity # - the default would be for every attribute value to be part of the identity. In some cases attributes such as descriptions may be excluded by explicitly defining which attributes form the identity


Download ppt "Entity vs Datatype."

Similar presentations


Ads by Google