rdf

curtosis 2023-06-08T17:00:41.289829Z

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).

simongray 2023-06-09T07:38:58.832849Z

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.

2023-06-09T13:19:47.896089Z

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

curtosis 2023-06-09T16:04:29.384379Z

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. 😛

2023-06-09T16:32:24.555039Z

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.

quoll 2023-06-09T18:12:49.137129Z

> 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.

curtosis 2023-06-09T18:13:30.389089Z

Oh, does Neptune have plans to support it?

quoll 2023-06-09T18:14:52.191769Z

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

curtosis 2023-06-09T18:15:44.835819Z

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

quoll 2023-06-09T18:16:34.218529Z

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

👍 1
curtosis 2023-06-09T18:17:03.358209Z

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

quoll 2023-06-09T18:18:41.665129Z

oh, his title is “Principal Graph Technologist”

quoll 2023-06-09T18:18:47.202919Z

(sorry)

quoll 2023-06-09T18:21:41.428849Z

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)

quoll 2023-06-09T18:22:58.319819Z

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

quoll 2023-06-09T18:23:54.105899Z

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

curtosis 2023-06-09T18:26:01.348619Z

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

curtosis 2023-06-09T18:26:33.912699Z

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

quoll 2023-06-09T18:27:09.502049Z

Both

quoll 2023-06-09T18:32:15.781239Z

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.

curtosis 2023-06-09T18:34:01.551599Z

That makes sense to me.

2023-06-09T18:34:32.346059Z

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

2023-06-09T18:35:38.206809Z

Oh, sorry I missed where you said that above

quoll 2023-06-09T18:37:26.912929Z

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)

curtosis 2023-06-09T18:42:32.320529Z

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

curtosis 2023-06-09T18:45:11.912399Z

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 }

curtosis 2023-06-09T18:50:37.642119Z

(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)

quoll 2023-06-09T18:51:06.929359Z

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

curtosis 2023-06-09T18:52:37.312649Z

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