Relation Types
Relation types are the "verbs" that link semantic concepts (called Entities in CogTL) together.
For example: an entity City
can have a relation type is located in
with an entity Country
, and a Citizen
can have one or many relation types with City
, like was born in
, lives in
, likes
, etc, depending on the business topic.
Like most configuration elements in CogTL, relation types have basic properties Name and Description (informative). They also have a Backwards name that will be used by CogTL whenever this relation is navigated backwards. For example, a relation type contains
could have a backwards name is part of
.
Features and usage
For simplification purposes, relation types can be configured, in one direction or both directions, by relation features. Relation features are abstract characteristics that may be common to multiple specific relation types. For example, family
could be a feature that is attached to multiple relation types like is a parent of
, is a brother of
, is a child of
, etc. More info about relation features here
Finally, to help reduce the risk of misconfiguration, you can define applicable source and target entity types for any relation. Typically, a relation type is located in
is applicable to a couple City
- Country
, but not to Car
and Insurance contract
for example.