This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-08
Channels
- # babashka (9)
- # beginners (43)
- # biff (4)
- # calva (11)
- # cider (6)
- # clerk (1)
- # clj-kondo (4)
- # cljs-dev (6)
- # clojure (82)
- # clojure-berlin (1)
- # clojure-europe (42)
- # clojure-nl (1)
- # clojure-norway (182)
- # clojure-quebec (1)
- # clojure-uk (19)
- # clojurescript (6)
- # datahike (1)
- # emacs (30)
- # fulcro (5)
- # honeysql (6)
- # hyperfiddle (12)
- # lambdaisland (8)
- # malli (11)
- # off-topic (36)
- # pathom (26)
- # pedestal (1)
- # portal (25)
- # practicalli (1)
- # rdf (29)
- # re-frame (17)
- # reitit (1)
- # releases (1)
- # sci (37)
- # shadow-cljs (15)
- # vim (10)
- # xtdb (13)
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).
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.
Are there reasons why you couldn't annotate the containing graph?
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. 😛
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.
> 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.
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
Interesting… my money (*not actual money) would have been on them letting RDF wither.
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)
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
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
Virtual as in, the core triple is real but the triples with that as subject are virtual?
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.So ?statement in this example would be encoded as a bnode?
Oh, sorry I missed where you said that above
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)Right, b/c RDF semantics explicitly say the reification does not entail the triple (or v.v.).
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 }
(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)