| • | A relation is a property with a concept as range |
| • | A relation describes the relationship between two concepts |
person[hasFather {1:1} *=> man].
person[hasParent {2:2} *=> person].
person[hasSibling {0:*} *=> person].
Relations may have special characteristics:
symmetry, transitivity and inverseness
| • | Symmetry |
person[relatedTo {0:*,symmetric) *=> person].
Means if a person A is relatedTo a person B than also person B is relatedTo person A.
The reasoner will give back {A,B} and {B,A} as a result
| • | Transitivity |
person[relatedTo {0:*, transitive} *=> person].
Means if a person A is relatedTo a person B and person B is relatedTo C than also person A is relatedTo person C.
The reasoner will give back {A,B}, {B,C} and {A,C} as a result
| • | Inverseness |
Inverseness is always defined between two different relations
person[hasChild {0:*, inverseOf(hasParent)} *=> person].
Means if a person A hasParent person B then person B hasChild person A is also valid.
The reasoner will give back {B,A} as a result for the query
?- ?X[hasChild->?Y].
| • | Property hierarchies |
Sometimes it is possible to reason more generic relations from more special relations. This may be expressed by property hierarchies.
hasSon<<hasChild.
hasDaughter<<hasChild.
hasChild<<relatedTo.
In this way stating person A hasSon person B will also lead to the statements person A hasChild person B and person A relatedTo person B.
Query for properties
In order to gather relational properties you should query:
?- ?X[?R {?P} *=> ()].
If you have the schema:
Person[hasAge {1:7, symmetric} *=>_duration].
then it is possible to execute:
?- ?X[?R {?MIN:?MAX, symmetric} *=>?Y].
but it is not possible to execute:
?- ?X[?R {?MIN:?MAX, ?PROP} *=>?Y].
The reason for this behaviour is the way in which relational properties are stored internally in OntoBroker.