Re: Consolidating triple/edges -- named occurrence version



On 5 Jan 2024, at 15:38, Olaf Hartig <olaf.hartig@liu.se> wrote:
I agree. However, as I observed yesterday, the identity of PG edges
should be encoded in RDF by the property names (emulating a singleton
property), and not by reification.

Mmh. From a PG perspective, the predicate of a triple---assuming
triples with a non-literal object---is like the label of an edge. In
this sense, what you are proposing would appear to PG folks as
(mis)using the edge labels as means to identify/distinguish all the
edges.

In Cypher, edges (called by them relationships) have relationship types and relationship variables.
For example, the Neo4J graph below represents our canonical example using only relationship types (i.e., SPOUSE):

(p1:Person {name: "Liz"})-[:SPOUSE {starts: 1964, ends: 1974}]->(p2:Person {name: "Liz"})
(p1:Person {name: "Liz"})-[:SPOUSE {starts: 1975, ends: 1976}]->(p2:Person {name: "Liz"})

However, a fully equivalent representation Neo4J  would be the one below, where edges are explicitly identified by the relationship variables wed-1 and wed-2:

(p1:Person {name: "Liz"})-[wed-1:SPOUSE {starts: 1964, ends: 1974}]->(p2:Person {name: "Liz"})
(p1:Person {name: "Liz"})-[wed-2:SPOUSE {starts: 1975, ends: 1976}]->(p2:Person {name: "Liz"})

In my understanding “the predicate of a triple is like the label of an edge” means more precisely that "the predicate of a triple is like the relationship variable of an edge”.
The proposed encoding in RDF is fully faithful to the Cypher representation.

cheers
—e.

Received on Friday, 5 January 2024 14:58:21 UTC