Fork me on GitHub
#rdf
<
2023-06-08
>
curtosis17:06:41

Have any of y’all applied rdf-star to capturing temporal validity? The two approaches I’ve dealt with in the past are regular reification (ugly) and agraph’s triple properties (agraph-specific).

simongray07:06:58

I haven't, though I'm interested in it. I've been held back by the fact that ontologies basically all work around triple metadata, e.g. through reification. While it is sometimes ugly, not adhering to the idiomatic way of doing things is often uglier. Since it's becoming a official part of the standard so late in the game, I doubt the uptake will be strong. If I ever start using it, it'll mostly be for internal implementation details, I think.

Eric Scott13:06:47

Are there reasons why you couldn't annotate the containing graph?

curtosis16:06:29

Sure, I think annotating a graph would work, in the limit case even with a graph-per-triple granularity, though makes querying for “currently asserted” statments a little bit more complex. I suppose the solution is to try all three approaches and see where each intersects badly with my query patterns. I just wish it were as (superficially, anyway) easy as Datomic’s assert/retract/as-of semantics. 😛

Eric Scott16:06:24

I guess there was some discussion of this stuff a few weeks back. I wonder if time-sensitivity might be a sign that the relationship is better modeled as an n-ary relation rather than a binary one -- or only included in 'snapshot' type graphs encoded as such.

quoll18:06:49

> Since it’s becoming a official part of the standard so late in the game, I doubt the uptake will be strong. If I ever start using it, it’ll mostly be for internal implementation details, I think. I don’t know about usage, but I expect most databases to support it. Amazon considers it to be important (well… Ora does). Stardog, GraphDB and Jena already support it.

curtosis18:06:30

Oh, does Neptune have plans to support it?

quoll18:06:52

Ora talked about doing work to find a common semantics between property graphs and RDF-*, so that Neptune will be able to support it. Neptune currently does a property graph (queryable via cipher or gremlin), or an RDF graph. They want to merge them

curtosis18:06:44

Interesting… my money (*not actual money) would have been on them letting RDF wither.

quoll18:06:34

Well, their chief researcher is Ora Lassila. I can’t see him walking away from RDF!

👍 2
curtosis18:06:03

To be fair that’s more a GOOG habit…. “Neptune-RDF is now a messaging app” etc.

quoll18:06:41

oh, his title is “Principal Graph Technologist”

quoll18:06:41

He is definitely a fan of some of the features of property graphs, and is very frustrated that SPARQL doesn’t have certain features in it. For instance, there is no operation to trace paths between nodes (Asami has this, and the hard part wasn’t finding the path… it was binding the result to the query semantics)

quoll18:06:58

One of his biggest complaints is RDF reification. He (quite rightly) pointed out that it was never supposed to be done by assertion of triples. Instead, those triples were expected to be virtual

quoll18:06:54

I’m a fan of that myself, though I’ve always struggled with how to represent reifications of triples that don’t exist when the reification is virtual

curtosis18:06:01

Virtual as in, the core triple is real but the triples with that as subject are virtual?

curtosis18:06:33

Or the other way round, which I suppose would be an interesting way to look at it…

quoll18:06:15

So… Ora (and I agreed) was expecting that if you have a triple of:

:subj :pred :obj
then this was automatically assigned an id (basically a blank node), and that node could be addressed in a query with:
{ ?statement rdf:subject :subj;
             rdf:predicate :pred;
             rdf:object :obj. }
So you could assert something about a statement with:
INSERT { ?statement :hasAuthor :Paula }
WHERE { ?statement rdf:subject :subj;
                   rdf:predicate :pred;
                   rdf:object :obj. }
Even though no explicit reification had been made.

curtosis18:06:01

That makes sense to me.

Eric Scott18:06:32

So ?statement in this example would be encoded as a bnode?

Eric Scott18:06:38

Oh, sorry I missed where you said that above

quoll18:06:26

However, reification also allows you to refer to triples that don’t exist.

INSERT DATA { [ rdf:subject :Peter;
                rdf:predicate :eats;
                rdf:object :brocolli ] :status :IllegalStatement }
If you only support reification virtually, then these sorts of assertions get hard to design into your architecture (there are approaches, but every time I’ve looked at it it’s been messy)

curtosis18:06:32

Right, b/c RDF semantics explicitly say the reification does not entail the triple (or v.v.).

curtosis18:06:11

Though part of that is that you multiple reifications are allowed for the same triple, right? So this should be perfectly fine:

INSERT DATA { [ rdf:subject :Peter;
                rdf:predicate :eats;
                rdf:object :broccoli ] :status :IllegalStatement }
INSERT DATA { [ rdf:subject :Peter;
                rdf:predicate :eats;
                rdf:object :broccoli ] :status :LegalStatement }

curtosis18:06:37

(Legal/Illegal is probably a bad example there, but you can say that two different people made the same statement and in neither case are you entailing that the statement itself is asserted)

quoll18:06:06

If triples are virtual, then that would be redundant. But if they’re explicit, then that creates 2 separate blank nodes with those properties.

curtosis18:06:37

That’s what I was thinking yes… that pattern breaks purely-virtual.