Re: Nested Graphs - a graph-based proposal

> On 26. Oct 2023, at 09:49, Olaf Hartig <olaf.hartig@liu.se> wrote:
> 
> Hi Thomas,
> 
> On Wed, 2023-10-25 at 23:43 +0200, Thomas Lörtsch wrote:
>> Hi Olaf,
>> 
>>> On 25. Oct 2023, at 22:01, Olaf Hartig <olaf.hartig@liu.se> wrote:
>>> 
>>> Hi Thomas,
>>> 
>>> I tried to understand your proposal but I failed because the notion
>>> of a Nested Graph that you aim to introduce is not actually defined
>>> in your text. The only thing you provide are several examples that
>>> are written using a Turtle-like syntax and that supposedly
>>> illustrate how Nested Graphs may be represented in that particular
>>> syntax, but these examples don't help me to understand what exactly
>>> a Nested Graph is.
>> 
>> this is definitely not a way of putting things that I have much
>> experience in, so please tell me if the following makes sense to you:
> 
> It is a start, but there are several aspects that need to be elaborated
> more on for this to become an actual unambiguous definition. See below.
> 
>> A nested graph is a pair consisting of an IRI or a blank node (the
>> graph name), and an RDF graph.
> 
> Okay, according to this sentence, a nested graph is structurally the
> same as a named graph. Fine.
> 
>> The name denotes the pair of name and graph.
>> Nested graph names are unique within an RDF dataset.
>> A nested graph may contain other nested graphs, recursively.
> 
> This sentence is a bit too vague for a proper definition. It needs to
> be made more clear what exactly "may contain" means.
> 
> I assume it means that a nested graph ng = (n,G) may have another
> nested graph as the subject or the object of some triple in the RDF
> graph of ng. In other words, there may be a triple t=(s,p,o) in G such
> that s or o is another nested graph ng' = (n',G').
> 
> Is that what you mean?
> 
> If so, notice that you are introducing a new kind of term that can be
> used in RDF triples (in addition to IRIs, blank nodes, and literals)!

No, it’s not what I mean. A nested graph may occur as "stand alone" graph, not only in subject- or object position. If it occurs in subject- or object-position, then that is syntactic sugar for separately stating it and making statements about it (referenced through its name). The analogy to named graphs is much more fitting than one to RDF-star.

>> A nested graph may occur in the default graph as well as in named
>> graphs.
> 
> "may occur" is also a bit too vague, and should be made more accurate
> in a way similar to what I am outlining above for "may contain".

Doesn’t that amount to a discussion of the difference between a glass half-full and half-empty? Nobody is required to use nested graphs for anything, that’s why I wrote "may". But if you use it, you may use it in the default graph as well as inside named graphs, the latter being especially noteworthy IMO.

> But
> also notice that another aspect that should be clear from the
> definition is whether a nested graph can occur multiple times in the
> default graph and/or in the named graphs?

I think that is clear by the way the denotation of the nested graph name is defined. Otherwise the two nested graphs would contradict each other, wouldn’t they?

> If the answer to the latter question is some form of yes, then how is
> this related to requirement that "nested graph names are unique within
> an RDF dataset"?
> 
> Also, are there any constraints regarding the graph names of nested
> graphs that "occur in the default graph as well as in named graphs" and
> the names of the named graphs of the dataset?

I think that the way names on nested graphs are defined rules out the possibility that the name is used to refer anything else, neither web resources nor real world concepts nor named graphs nor etc.


Thomas


> Best,
> Olaf
> 
>> 
>> 
>> Best,
>> Thomas
>> 
>> 
>>> 
>>> In comparison, I understand what an RDF triple is because that
>>> notion is well defined [1], and so is the notion of an RDF graph
>>> [2] and the notion of a Named Graph [3]. Along the same lines, can
>>> you provide a definition of the notion of a Nested Graph that you
>>> have in mind?
>>> 
>>> Thanks,
>>> Olaf
>>> 
>>> [1]
>>> https://www.w3.org/TR/rdf12-concepts/#dfn-rdf-triple
>>> 
>>> [2]
>>> https://www.w3.org/TR/rdf12-concepts/#dfn-rdf-graph
>>> 
>>> [3]
>>> https://www.w3.org/TR/rdf12-concepts/#dfn-named-graph

Received on Thursday, 26 October 2023 10:30:36 UTC