Previous Topic: Attribute DescriptionNext Topic: Attribute Source Category


Attribute Optionality

The optionality of an attribute indicates whether each entity of the entity type that is described by the attribute must have a known value for the attribute under consideration.

There are two options for attributes:

Consider the attributes of the entity type CUSTOMER:

Of the attributes for the entity type CUSTOMER, five are mandatory and three are optional as summarized in the following table.

Attribute

Optionality

Number

Mandatory

Name

Mandatory

Address

Optional

Phone Number

Optional

Status

Mandatory

Credit Rating

Optional

Date Known

Mandatory

Outstanding Orders Value

Mandatory

As with relationship memberships, the optionality of an attribute can sometimes be affected by a combination of values of other relationships and attributes. In this case, the combination can be represented as an optionality condition.

There are three types of attribution optionality conditions:

For example, assume that the attribute Status can have an attribute value of Cash Only and that only CUSTOMERs with that Status are allowed to have no Credit Rating. The following optionality condition would apply to Credit Rating: Required when Status is not equal to Cash Only.

Forbidden conditions are not nearly as common as Required ones, but they are possible. Consider the case where another possible value of Status is Highly Credit Worthy. Assume that the business wants to avoid offending such CUSTOMERs with queries about their credit worthiness and to forbid the inclusion of a value for Credit Rating for them. Further assume that the previous Cash Only optionality condition is true.

The new optionality conditions for Credit Rating are:

When you find that the same integrity condition determines the existence of several optional attributes and relationship memberships, it is worth considering defining a subtype or another entity type and moving the affected attributes and relationships so that they describe only entities of that subtype.

Using CA Gen, optionality conditions for an attribute is specified as part of its description.

More information:

Defining Partitioning