Skip to content
Ted Thibodeau Jr edited this page Aug 8, 2024 · 15 revisions

RDF-star and LPGs (DRAFT 2024.07.23)

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

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

<-->

:a1  a               :Account ,
                     FinancialOperation ;
     :accountNumber  1 .
:a2  a               :Account ,
                     FinancialOperation ;
     :accountNumber  2 .
:a3  a               :Account ,
                     FinancialOperation ;
     :accountNumber  3 .

<< :e1 | :a1 :TRANSACTION :a2 >>
     :amount    1000 ;
     :currency  "gbp" ;
     :date      "2002-09-24Z"^^xsd:date .

<< :e2 | :a1 :TRANSACTION :a2 >>
     :amount    500 ;
     :currency  "eur" ;
     :date      "2003-10-24Z"^^xsd:date .

<< :e3 | :a2 :TRANSACTION :a3 >>
     :amount    900 ;
     :currency  "gbp" ;
     :date      "2002-10-03Z"^^xsd:date .

OBSERVATIONS:

  • Node identifiers, node labels, edge identifiers, and edge labels are denoted by IRIs.

  • Keys are denoted by IRIs, and values are denoted by literals.

  • Triple terms have transparent semantics.

  • Triple terms involve node identifiers as subject and object and an edge label as property.

  • Reifiers denote edge identifiers.

IN THIS SCENARIO, the ONLY simple entailments involving triple terms are due to the bnode abstraction rule of simple entailment, e.g., the following is entailed:

:e1  rdf:reifies  <<( _:n1  :TRANSACTION  _:n2 )>> .
:e1  :amount      _:v1 .

These entailments can be considered as harmless in this scenario, e.g., by discarding any triple with a triple term involving bnodes.

Another case would be the entailment:

_:g1  rdf:reifies  <<( :a1  :TRANSACTION  :a2 )>> .
_:g1  :amount      1000 .
_:g2  rdf:reifies  <<( :a1  :TRANSACTION  :a2 )>> .
_:g2  :amount      500 .

which introduces new edge identifiers _:g1 and :g2 for the existing edges originally identified by :e1 and :e2. Note that all the entailments in which the new edge identifiers _:g1 and :g2 are involved are exactly the same as the ones in which the original edge identifiers :e1 and :e2 are respectively involved. These entailments can be considered as harmless in this scenario, e.g., by discarding any triple with bnodes.

Note that the above entailments are the only ones involving bnodes as edge identifiers, so that a bnode denoting an edge identifier will never be associated to any other edge. Therefore, "functionality" of rdf:reifies is always implicitly satisfied in this scenario.

Finally, the LPG data encoded in RDF as above can be extended, without changing the base encoding, by adding more RDF, RDFS, SHACL, OWL schema information. For example we can add any or all of the following:

:e1  a                     :transaction .
:e2  a                     :transaction .
:e3  a                     :transaction .

:e1  :sourceOfTransaction  :a1 .
:e1  :targetOfTransaction  :a2 .
:e2  :sourceOfTransaction  :a1 .
:e2  :targetOfTransaction  :a2 .
:e3  :sourceOfTransaction  :a2 .
:e3  :targetOfTransaction  :a3 .

:a1  :TRANSACTION          :a2 .
:a2  :TRANSACTION          :a3 .

:a1  :hasTransactionOn     "2002-09-24Z"^^xsd:date .
:a1  :hasTransactionOn     "2003-10-24Z"^^xsd:date .
:a2  :hasTransactionOn     "2002-10-03Z"^^xsd:date .

etc.

Clone this wiki locally