W3C home > Mailing lists > Public > public-swbp-wg@w3.org > December 2005

RE: [SKOS, SPARQL, ALL] Closure and SPARQL

From: Pat Hayes <phayes@ihmc.us>
Date: Thu, 8 Dec 2005 17:51:44 -0600
Message-Id: <p06230901bfbe72bb8805@[10.100.0.23]>
To: "Christoffel Dhaen" <christoffel@landcglobal.com>
Cc: <public-swbp-wg@w3.org>

>Most KR systems indeed offer the option to query for both, but I 
>must say I always assumed a SPARQL query would support transitive 
>closure, hence would return the logical result instead of only 
>directly asserted results.

Im not sure what you mean by 'logical result'. Since neither RDF nor 
RDFS can express transitivity or transitive closure, there isn't any 
RDF or RDFS notion of logical inference that would support a SPARQL 
query which assumed transitive closure. So to have SPARQL provide 
transitive closure would mean that SPARQL was more expressive than 
the languages it was designed to query, which seems to me to not be 
particularly logical.

>If both are required, the graph could solve it, but why not add the 
>option in the query instead of having to query 2 graphs. A direct 
>result might be requested as
>SELECT DIRECT ?x ?y
>And the logical result might be requested as
>SELECT ALL ?x ?y

But why would we limit this to transitive closure? There are no end 
of properties that might be useful to some query, and it clearly 
isn't reasonable for SPARQL to set out to provide them all (even if 
that made sense), so why would we be justified in picking this 
particular one out? Especially as it relies on information (that a 
property is transitive) which cannot even be expressed in the 
notation we are querying. Suppose for example we had this option, and 
a SELECT ALL query were delivered to an RDFS querying service, with a 
query pattern which mentions the properties ex:p and ex:q. How can it 
possibly know whether or not either of these is transitive? Even if 
some other system knows this, how can it transmit this information to 
the query server, if it cannot be expressed in RDF or RDFS?

I think that what you really want is a querying language designed to 
query against a notation - such as OWL - which really can express 
transitivity explicitly, and so to which these objections therefore 
do not apply. But then you do not need to tinker with the query 
language, since the query itself could specify transitivity 
properties of properties in the query pattern, or a graph could 
advertise itself as assuming transitivity, in its own assertions. To 
sum up: if you can say what you want to say in the assertion language 
against which you are posing the query, then you can query it by 
writing the appropriate patterns into your query. But if you can't, 
the the query language shouldn't (IMO) pretend that you can.

Pat Hayes


>
>Which one should be default is debatable, but it seems to me that a 
>lot of applications may only be interested in the logical result of 
>the query.

To repeat, there is no 'logical result' of an RDF or RDFS query which 
would support checking transitive closures. You would need to have 
something like OWL, or have a rule language added, in order to be 
even able to say 'transitive'.

>The option to query only direct is also very valuable to browse the 
>graph (or parts of it), which can be used, amongst other things, in 
>DS-systems, or search-engines (refine query).
>
>Adding a second Closure equivalent of the property would only make 
>querying more complicated, unless a standard to do this is defined.
>
>
>
>Christoffel
>
>
>
>This email and its attachment(s) is confidential and intended solely 
>for the use of the individual to whom it is addressed, and not 
>intended to be further distributed without explicit prior approval 
>of the sender. Any views or opinions presented are solely those of 
>the author and do not necessarily represent those of Language & 
>Computing, Inc. unless explicitly indicated. If you are not the 
>intended recipient, be advised that you have received this email in 
>error and that any use, dissemination, forwarding, printing, or 
>copying of this email is strictly prohibited.
>
>
>
>
>
>
>-----Original Message-----
>From: public-swbp-wg-request@w3.org 
>[mailto:public-swbp-wg-request@w3.org] On Behalf Of Christopher Welty
>Sent: maandag 5 december 2005 2:20
>To: McBride, Brian
>Cc: public-swbp-wg@w3.org; public-swbp-wg-request@w3.org
>Subject: Re: [SKOS, SPARQL, ALL] Closure and SPARQL
>
>
>Yes, every KR system I've ever used provided an API for getting "asserted"
>vs. "inferred" information.  Logically they are equivalent.
>
>-Chris
>
>Dr. Christopher A. Welty, Knowledge Structures Group
>IBM Watson Research Center, 19 Skyline Dr., Hawthorne, NY  10532
>Voice: +1 914.784.7055,  IBM T/L: 863.7055, Fax: +1 914.784.7455
>Email: welty@watson.ibm.com
>Web: http://www.research.ibm.com/people/w/welty/
>
>
>
>"McBride, Brian" <brian.mcbride@hp.com>
>Sent by: public-swbp-wg-request@w3.org
>12/03/2005 04:16 PM
>
>To
><public-swbp-wg@w3.org>
>cc
>
>Subject
>[SKOS, SPARQL, ALL] Closure and SPARQL
>
>
>
>
>
>
>
>I have been reviewing SPARQL last call WD on the plane as promised, and
>wanted to return to an issue that David Wood had previously raised.  (No
>URLs available at 30k feet - sorry)
>
>SPARQL does not support the expression of property closures, e.g.
>transitive closure.
>
>To ground this in BP work, consider an RDF graph that includes
>dc:subject properties whose values come from a SKOS taxonomy.  You
>cannot express directly in SPARQL a query to find all the resources
>whose dc:subject is a (possibly indirect) narrower term of some term T.
>
>I earlier suggested that SPARQL does not have to support transitive
>closure because the graph can do it.  There can be an inferencing graph
>which computes the transitive closure of skos:narrower.  If you query
>that graph you query the transitive closure relationship.  If you query
>the ground graph you get the direct, well at least directly asserted,
>relationship.  The question arises, whether there is a need to
>distinguish between the direct relationship and the closure
>relationship.  Are these different properties.  Should we define
>skos:inNarrowerClosure (or something more appealingly named).
>
>In terms of the plumbing, this is not necessary.  SPARQL supports
>querying over multiple graphs and so can support querying the ground
>graph to get at the direct relationship and an inferred graph to get at
>the closed one.
>
>However it strikes me that the direct relationship and the closure are
>different relationships and it might be best practice, perhaps
>generally, perhaps under certain circumstances, to define both.  I
>believe the distinction to be useful.  If I am creating a graphical
>representation of a SKOs taxaonomy, I want to query for the direct
>relationship.  But if I'm searching for relevant resources, I probably
>want the closure relationship.  If it can be useful to make this
>distinction, there may be value in defining property to relate the
>direct property to its closure property, e.g. ex;isTransitiveClosureOf.
>
>I'm feeling a bit out of my depth here.  I expect this all got worked
>out a while ago, but just thought I'd check.
>
>Brian
>
>
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 2/12/2005
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Free Edition.
>Version: 7.1.371 / Virus Database: 267.13.12/193 - Release Date: 6/12/2005
>


-- 
---------------------------------------------------------------------
IHMC		(850)434 8903 or (650)494 3973   home
40 South Alcaniz St.	(850)202 4416   office
Pensacola			(850)202 4440   fax
FL 32502			(850)291 0667    cell
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes
Received on Thursday, 8 December 2005 23:52:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:31:15 UTC