Previous | Table of Contents | Next
Problem – Describing Attribute Type
Compatibility
An attribute is often classified as a particular type by industry conventions. However, this classification may carry additional semantic information that can more accurately be modeled as separate attribute facets. Rather than force unnatural conventions upon the users of a system that make it more difficult to use, this additional semantic information must be extracted from the classification. For example, in classifying an animal as a bird, an implicit assumption may be made that the subject of a classification can fly. However, penguins are birds and they can't fly. Bats are mammals and they can fly. Moreover, a pigeon may have a broken wing and in its current state, it cannot fly.
Solution
Determining if an attribute is compatible with a certain type can be accomplished through the declaration of a sub-type for modeling situations where only one or two attribute facets are relevant. For exceptional classifications, it may be necessary to attach a condition that checks the state of the entity, such as the broken wing that prevents a specific bird from flying. Conditions may be attached to entity types or instances. In the latter case, the set of name instances that possess the same attribute represent their own unique sub-type that can be chained with the simple enumeration sub-typing. This is especially useful when addressing modeling problems where grandfathered classifications exist, such as a group of active employees that were parties to a victorious class action suit against their employer which warrant special treatment. Such a group represents a closed set that may not consider additional instances.
Example – Passing
Grade
A basic example that utilizes a sub-typing scheme creates a subset of all grades and then associate an attribute of passing with each. No additional conditions are needed to make the determination.
Parameters:
Enumeration Type |
Grade |
Enumeration Sub-type |
Passing grade |
Enumeration Values |
A, B, C |
Case: Is this a passing grade?
Input |
Grade = B |
Output |
True |
Conditional logic is usually necessary to address exceptional situations. This example identifies a residential single family home and is able to include it as a member of multi-family because of qualifying conditions. Thus, this property exhibits classification in two normally disjunct categories. The classification of real estate property can become quite complex. The ability to identify an individual instance as an exception provides a mechanism to focus on the exceptions rather than a contrived classification that would be too onerous for normal usage. However, many exceptions of this type may be found in certain communities. Thus this example names an attribute that can identify a significant subset or real estate properties. If this was not the case, the individual property could be named as the value for the condition. This represents instance level parameterization.
Parameters:
Enumeration Type |
Residential Real Estate Property |
Domain |
{vacant, multi-family, attached, detached house} |
Enumeration Sub-type |
Multi-family property |
Value |
Detached house |
Condition |
has coach house |
Case: Is this a multi family property?
Input |
123 Main Street - a colonial house with coach house over garage |
Output |
True |
The Type Membership business rule pattern may be represented as a collection of types to which it is a member.
Previous | Table of Contents | Next