Using rdf:asserts (for Truth) and rdf:reifies (for Hypothesis) to be on par with relational and LPG

Suppose there are two kinds of statements that we need to store using our data model: Truth and Hypothesis.

Within an id-based scope (i.e., a scope that contains id-s-p-o tuples), I'd like to specify an s-p-o either as a Truth or as a Hypothesis. If we use a single RDF-blessed property, rdf:reifies, we can do this as follows:
    :id rdf:reifies <<( :s :p :o )>> ; a :Truth .
    OR
    :id rdf:reifies <<( :s :p :o )>> ; a :Hypothesis .

What's the complexity? An extra triple has to be added to designate an id-s-p-o tuple as a Truth or a Hypothesis. Retrieval of one kind of statements via SPARQL then requires an additional triple-pattern: Example=> { ?id rdf:reifies <<( ?s ?p ?o )>> ; a :Truth } .

Doing this in RDF is more complex than what's needed in the case of relational data. There we do not need to add any extra row to the table to indicate this – we just need an extra column, in the existing row, to be populated. SQL query simply needs an extra condition (e.g., <tableAlias>.kind = 'Truth'), not an extra join.

Doing this in RDF is more complex than what's needed in the case of LPG data as well. There, assuming edge is actually stored as a struct or record, all that is needed is adding and populating an extra attribute (i.e., edge-property). The query for the extended LPG data only needs an extra filter (e.g., <edge-var>.kind = "Truth").

So, to avoid this Truth/Hypothesis handling complexity related disadvantage compared to relational data and LPG, my suggestion would be to integrate the Truth or Hypothesis indicator into the id-s-p-o tuple itself by providing two distinct RDF-blessed properties, say rdf:asserts (for Truth) and rdf:reifies (for Hypothesis) – all within the id-based scope. (This does not affect s-p-o triples in any way because those are not part of any id-based scope. Those are in a "default" (no id) scope.)

Thanks,
Souri.

Received on Thursday, 22 August 2024 04:17:38 UTC