Re: Translating Property Graphs with Multiple Labels to RDF-sta

Hi Dominik,

As you know, many definitions of Property Graphs, including those utilized in GQL, permit nodes and edges to possess multiple labels. This is somewhat different from the examples commonly cited, such as those on the wiki, which typically feature nodes and edges with single labels for simplicity and clarity.

To illustrate my point, consider the following Property Graph example where both nodes and edges have dual labels:

CREATE (a1:Account:FinancialEntity {accountNumber: 1})
CREATE (a2:Account:FinancialEntity {accountNumber: 2})
CREATE (a3:Account:FinancialEntity {accountNumber: 3})

CREATE (a1)-[:TRANSACTION:FinancialOperation {amount: 1000, currency: "gbp", date: "2002-09-24Z"}]->(a2)
CREATE (a1)-[:TRANSACTION:FinancialOperation {amount: 500, currency: "eur", date: "2003-10-24Z"}]->(a2)
CREATE (a2)-[:TRANSACTION:FinancialOperation {amount: 900, currency: "gbp", date: "2002-10-03Z"}]->(a3)

In this scenario, nodes are labeled both as `Account` and `FinancialEntity`, and edges are labeled as `TRANSACTION` and `FinancialOperation`. This dual labeling adds a layer of complexity when attempting to translate such Property Graphs to RDF-star.

Multiple labels on nodes: the following triples should be added to the example in the wiki:


:a1 a :Account , :FinancialEntity .


:a2 a :Account , :FinancialEntity .
:a3 a :Account , :FinancialEntity .

Multiple labels on relationships:
Cypher does not allow for multiple labels (type) on relationships, while you could easily have them using the reified relationship with the proposed mappings in RDF-star:


:e1 a :transaction , :FinancialOperation .

:e2 a :transaction , :FinancialOperation .

:e3 a :transaction , :FinancialOperation .

cheers
—e.

Received on Tuesday, 23 July 2024 10:53:52 UTC