W3C home > Mailing lists > Public > public-rdf@w3.org > March 2012

Re: Can't RDF describe collection resources?

From: Enrico Franconi <franconi@inf.unibz.it>
Date: Thu, 1 Mar 2012 10:20:41 +0100
Cc: public-rdf@w3.org, public-rdf-wg@w3.org, W3C SWIG Mailing-List <semantic-web@w3.org>
Message-Id: <65AC6799-341C-4508-9BFB-C6BDAF1D750F@inf.unibz.it>
To: Ruben Verborgh <ruben.verborgh@ugent.be>
On 1 Mar 2012, at 10:06, Ruben Verborgh wrote:

> Hi Enrico,
> 
>> your problem is just a classical conceptual modelling in databases problem, with 30+ years of history.
>> In this case - like in any case where the graph just represents plain relational structure - your RDF graph corresponds to a RDB, and there is simply no way to express the relationship between :hasComments and :hasComment within the RDB data model - you need to express it with some higher level constraint.
> 
> I see.
> 
>> Note that the :hasComment property is redundant in the sense of RDB: its content is equal exactly to the composition of :hasComments and :memberOf. As a matter of fact, the precise and correct way is to use owl property chains as metadata relating :hasComments and :hasComment via :memberOf.
> 
> That’s true—but it fails if there are no comments to the blog post. Then the comments resource exists (it’s just an empty list), but you cannot refer to it because the chaining won’t work.

No. Think to it relationally: you have a table ":hasComments" which would relate a post to its comments, and a table ":memberOf" relating each set of comments to each specific comment in it. I can have a tuple from a post to its comments, but I do not necessarily have any tuple from such comments to elements. In this case, the derived composed table :hasComment would not have a tuple for that blog post.

> The reason I still want to refer to it, is that I need this resource to add new comments.
> E.g., I want to do a POST to /posts/35/comments to add a new comment, so I have to know the comments resource to be able to manipulate it.

Fine, but see my comment above. The modlling is correct and it treats explicitly the comments resource.
cheers
--e

>> On 1 Mar 2012, at 07:28, Ruben Verborgh wrote:
>> 
>>> Dear Semantic Web enthousiasts,
>>> 
>>> Suppose we have a Web application for blogging:
>>> - /posts/35 is a blog post
>>> - /posts/35/comments are the comments to that post
>>> - /posts/35/comments/3 is a specific comment to this post
>>> 
>>> In RDF, it is straightforward to make the relation between the blog post and a specific comment:
>>> </posts/35> :hasComment </posts/35/comments/3>.
>>> It is also easy to describe the relation between a specific comment and all comments:
>>> </posts/35/comments/4> :memberOf </posts/35/comments>.
>>> 
>>> However, how do we indicate the relationship between the blog post and *all* comments that belong to it?
>>> I.e., what is the relationship between </posts/35> and </posts/35/comments> ?
>>> 
>>> One could make a new predicate for that of course:
>>> </posts/35/> :hasComments </posts/35/comments>.
>>> But then, we still have to explain the relation between :hasComments and :hasComment; and we’d have to do that for every such plural predicate.
>>> 
>>> This seems to be a fundamental problem.
>>> Clearly, the resource “comments on blog post 35” exists, but there doesn’t seem to be a straightforward way to describe it in RDF.
>>> RDF lists will not be sufficient: they could indeed explain the relation between a specific comment and all comments, but not the relation between all comments and the blog post.
>>> Also note that the indirect relation “_:x :hasComment _:y. _:y :memberOf _:z” is not sufficient: a blog post can have no comments, but even then it still has an (empty) comments resource.
>>> 
>>> Have you encountered this issue and how do you solve it?
>>> 
>>> Kind regards,
>>> -- 
>>> Ruben Verborgh
>> 
>> 
> 
> 



Received on Thursday, 1 March 2012 09:21:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 1 March 2012 09:21:19 GMT