Semantics of relational operators visualized
Last updated
Last updated
Consider two relations: traveler[Trip*Person]
and dest[Trip*Destination]
. The first relation tells which persons have traveled on which trip. The diagram shows this as red dashed lines. The second relation links trips to destinations. It is depicted by dotted blue lines in the diagram.
Each pair (fact) in the diagram can be written as a fact in two ways, using the converse operator:
Fact | Fact |
|
|
|
|
|
|
|
|
|
|
From the diagram, we assume that each pair represents a true statement (i.e. a fact). The statements are given both formally and in natural language. The elaborate version is a literate translation of the semantics in logic. The ordinary version tells the same in a more human sounding manner.
Formal statement | Elaborate natural language | Ordinary natural language |
| There is a trip that Peter has made, which has Rome as destination. | Peter has made a trip to Rome. |
| There is a trip that Peter has made, which has Paris as destination. | Peter has made a trip to Paris |