Skip to content

[FEATURE]: Inherit relationships through the ontology #43

Description

@ulsmo

Is there an existing issue for this?

  • I have searched the existing issues

Problem Statement

When creating subclasses in the ontology, it's great that the attributes are inherited and can be added in the mappings.
Relationships don't get the same functionality - if there are relationships defined on the parent class, data cannot be mapped to the relationship for the subclass and no relationships are created in the knowledge graph for the subclass.

Proposed Solution

Either:

  1. Create an explicit mapping for relationships for the subclass when a parent has a defined relationship.
    This could result in a combination explosion for mappings, especially for self-referencing relationships.
  2. Load a relationship for the subclass based on the mapping from the parent class.
    This would require resolving which subclass the mapping should be applied to when loading.

Area

Mapping (Manual / SparkSQL)

Additional Context

It's possible to assign a mapping for both the parent and subclass entities, and their id's don't have to be the same. This leads to some modeling considerations that might influence how inherited relationships can work:

  1. If the knowledge graph loads entities at parent and subclass levels and the id's are the same, should both instances be loaded into separate entities or merged together at the subclass level?
  2. Should the modeler define a relationship between the parent and subclass to inform they are the same, or should the equality of the instances be inferred?
  3. If equality is inferred, can the query endpoints and AI chat functionality deduce the equality at execution time from the ontology, or would it be better to materialize these equality relationships using inference rules?

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions