Inheritance in logical modeling

Entities can use inheritance, where one (child) entity can extend another (parent) entity.
the entities PersonParty and OrganizationParty inherit from the Party entity. While they inherit all attributes from their parent, they also include specific attributes or characteristics unique to each entity type.

Using inheritance

When inheritance is used:

  • The child entity inherits the following elements: attributes, unique keys, validations, enrichers, and references.

  • Matchers and survivorship rules are not inherited.

  • The entity type cannot be modified; the child entity inherits from the parent entity type.

  • Elements such as attributes, unique keys, validations, enrichers, and references can be added to the child entity.

  • The physical tables generated for both the child and parent entities are identical. They encompass a superset of all attributes within the entity cluster.

  • Deleting an inherited attribute from a child entity removes it from the parent entity and all other child entities inheriting from the parent.

  • Entity inheritance cannot be modified directly from the Entity editor; the Alter Entity option must be used.

  • When managing entities that inherit attributes from a parent and include additional attributes, you can reorder and delete (non-inherited) attributes from the entity’s Inherited Attributes (All) section. Reordering additional attributes before inherited attributes is not supported, and inherited attributes cannot be deleted.

Inheritance limitations and recommendations

While inheritance offers a way to avoid redundant design elements among similar entities, its benefits are often tempered by several limitations:

  • Navigating through references defined on a parent (abstract) entity does not distinguish between the types of inheriting entities. Since reference navigation often requires differentiation between these entities, designers often opt to create references directly on inheriting entities, negating some of the advantages of inheritance.

  • Records from two entities inheriting from the same abstract parent entity cannot be matched. For example, if there is an AbstractOrganization entity with two inheriting entities, PrivateOrganization and PublicOrganization, you cannot create a matcher to find duplicates between PrivateOrganization and PublicOrganization.

  • SemQL does not provide access to the type of the instance being manipulated, nor does it allow access to attributes of inheriting entities from the abstract entity level. Consequently, rules cannot be aggregated at the abstract level.

  • Multiple inheritance, where an entity inherits from multiple abstract parent entities, is not supported.

Due to these limitations, utilizing inheritance can restrict the long-term evolution of a model. It is advised to avoid using inheritance unless these limitations are fully understood.

Experience suggests that a simpler approach involving a single entity containing all attributes, with conditions for rule execution or customization of UI artifacts, can provide similar benefits and greater flexibility to the model. This approach is generally recommended over inheritance in most scenarios.