Re: Nested Graphs - a graph-based proposal

> On 19. Oct 2023, at 20:21, Peter F. Patel-Schneider <pfpschneider@gmail.com> wrote:
> 
> This does not appear to be a proposal for nested graphs, 

The label "Nested Graphs" refers to the syntax, it is a memorizable and illustrative name. It doesn’t try or claim to capture formally what’s going on under the hood.

> but instead a proposal for identifying a subset of the triples in an RDF graph and allowing this set to be the subject or object of a triple.  So it appears to be an alternative syntax for one view of RDF datasets (as evidenced by the quad-based surface syntax) - the view where all the triples in the dataset are asserted.

It is really independent from datasets, as you can query the nested graphs in a set of named graphs of your choosing (via a FROM or FROM NAMED clause).

> However, there appears to be a decided change in semantics under the hood that is exposed in the querying section.  BGPs now appear to match against a bag of triples instead of matching against an RDF graph as the first query returns two results.  (It appears that the third query is incorrect and should have instead GRAPH ?g {  :Alice ?p ?o }.)

My apologies for the sorry state of the querying examples so far. I hope to tidy that up in the coming days. The text is the more dependable reference right now.

> The idea that it is possible to have different "versions" of IRIs (e.g., potentially different ages for :Alice) in the same graph is also a change to RDF.  This change may make RDF better, but it is fundamental change.
> 
> I'm unclear as to what "standard RDF n-ary relations" refers to.

It refers to every situation when one end of the simple triple branches out to accomodate for more detail in the description of the node at that end. Those branches are often mediated by blank nodes. E.g. you start with:

:Alice :buys :Car.

Then you realize that you want describe that car, but not all cars. So you change the graph into:

:Alice :buys [ :type :Car ; :color : Green ] .

Or you want to describe that Alice was 40 years old when she bought that car:

[ :type :Alice ; :age 40 ] :buys [ :type :Car ; :color : Green ] .

That is not a fundamental change to RDF. The long text gives 3 different mappings to RDF to prove that it doesnt change RDF.

The syntax however changes and with it what first catches the readers attention: Alice and the car, not _:bn1 and _:bn2. That is indeed a new feature, and a very useful one imho.

There seems to have been increased interest in the mapping of RDF-star to Property Graphs lately, an issue that was rather marginalised in the CG. Annotations on a property change that property in exactly the same way as the age annotation changes the reference to Alice: it adds more detail to that instance of the property, or Alice, without making any assertion about that property, or Alice, in general. 

> It is not the case that this proposal has the feature that "no intermediate node is required to differentiate different occurrences".  Instead this proposal has a built-in intermediate node, namely the graph name.  So the graph in a named graph is a type, and the name intermediates between the graph and uses of the graph as an occurrence.  

Right, and one might argue if the nested graph is an occurrence or a subtype - in the long text I discuss that in a bit more detailed.

> This is very similar to the situation for predicates in RDF.

The difference is that no intermediate node has to be created explicitly, which can be forgotten or willfuly omitted (and that omission later regretted), but that the intermediary - or rather: the identifier - is created automatically. That brings a very useful amount of predictability and uniformity which helps to avoid situations where queries have to be rewritten or have to account upfront for various different ways to model the issue.

> The semantics section of the proposal does not actually provide a semantics for nested graphs.   All that is says, implicitly, is that nested graphs are resources.  Then there is some discussion about quoting.   But this does not result in a semantics for nested graphs.

It sure is not a model-theoretic semantics, but I hope that it answers the crucial questions in an informal way. 


> 
> peter
> 

Received on Thursday, 19 October 2023 20:37:54 UTC