List Info

Thread: SPARQL vnext new feature?




SPARQL vnext new feature?
user name
2007-11-03 17:59:11
Was playing around with SPARQL';s grammar courtesy of Eric Prud'Hommeaux and we checked what needed to be done to facilitate more concise queries against remote endpoints.

Eric changed:

[9]     DatasetClause     ::=       'FROM' ( DefaultGraphClause |
NamedGraphClause |   'CONSTRUCT' ConstructTemplate DatasetClause*
WhereClause )

to allow

SELECT ?a ?b
  FROM ( CONSTRUCT { ?d <b> ?b }
                          FROM < http://example.com/sparql?>;
                        WHERE { ?b <b> ?d } )
 WHERE { ?a <b> ?b }

The idea is that currently one has to do something like

SELECT ?a ?b
WHERE
&nbsp;  {
        GRAPH <http://example.com/sparql?query=CONSTRUCT%20%7B%20%3Fd
%20%3Cb%3E%20%3Fb%20%7D%20FROM%20%3Casdf%3E%20WHERE%20%7B%20%3Fb%20%
3Cb%3E%20%3Fd%20%7D%20&;format=text%2Frdf%2Bn3>
 ;       { ?b <b> ?d.}
{ ?a <b> ?b }
   }

Which is somewhat less likely to be written.

-Alan
Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United States
2007-11-03 22:56:52
Alan Ruttenberg wrote:
> 
> SELECT ?a ?b
>   FROM ( CONSTRUCT { ?d <b> ?b }
>                           FROM < http://example.com/spa
rql?>
>                         WHERE { ?b <b> ?d } )
>  WHERE { ?a <b> ?b }


Yes... the Data Access WG considered this sort of thing
briefly;
we didn't see any particular reason not to do it but we...

RESOLVED 2005-01-20: to postpone cascadedQueries; while
federation use 
cases are interesting, the designs don't seem mature and the
use cases 
are not urgent; with KendallC abstaining.
http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries

I'm happy to see people playing around with it; I hope the
designs get mature soonish.


-- 
Dan Connolly, W3C http://www.w3.org/
People/Connolly/



Re: SPARQL vnext new feature? cascadedQueries
user name
2007-11-03 23:09:39
This is a particularly&nbsp;easy one, since it adds no new expressivity. The form below can be syntactically transformed into SPARQL as specified now by way of using the SPARQL protocol for the construct in the FROM. ;

Since this is the only reasonable way we have to do federation now, within spec, it's more like adding friendly syntactic sugar.

&nbsp;
-Ala



On 11/3/07, Dan Connolly < connollyw3.org">connollyw3.org>; wrote:
Alan Ruttenberg wrote:
>;
> SELECT ?a ?b
>&nbsp;  FROM ( CONSTRUCT { ?d <b> ?b }
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  FROM < http://example.com/sparql?>
> &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; WHERE { ?b <b> ?d } )
>&nbsp; WHERE { ?a <b> ?b }


Yes... the Data Access WG considered this sort of thing briefly;
we didn't see any particular reason not to do it but we...

RESOLVED 2005-01-20: to postpone cascadedQueries; while federation use
cases are interesting, the designs don't seem mature and the use cases
are not urgent; with KendallC abstaining.
http://www.w3.org/2001/sw/DataAccess/issues#cascadedQueries

I'm happy to see people playing around with it; I hope the
designs get mature soonish.


--
Dan Connolly, W3C http://www.w3.org/People/Connolly/


&nbsp;
Re: SPARQL vnext new feature? cascadedQueries
user name
2007-11-03 23:50:01
You might be interested in Network Graphs [1], which has
similar motivations:

"..By this extension it becomes possible to define a
graph including a
view onto other graphs and to define the meaning of a set of
graphs by
the way they reference each other"

[1] http://www.uni-koblenz.de/~sschenk/publications/200
6/ngtr.pdf

-- Chimezie


Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United Kingdom
2007-11-04 06:35:05
On 4 Nov 2007, at 04:09, Alan Ruttenberg wrote:

> This is a particularly easy one, since it adds no new
expressivity.  
> The form
> below can be syntactically transformed into SPARQL as
specified now  
> by way
> of using the SPARQL protocol for the construct in the
FROM.
> Since this is the only reasonable way we have to do
federation now,  
> within
> spec, it's more like adding friendly syntactic sugar.

As far as I can tell there's no way to tell that <http://example.com/sparql?
 
 > is a SPARQL endpoint, rather that a graph served by a
CGI script  
with no arguments.

- Steve

> On 11/3/07, Dan Connolly <connollyw3.org> wrote:
>>
>> Alan Ruttenberg wrote:
>>>
>>> SELECT ?a ?b
>>>  FROM ( CONSTRUCT { ?d <b> ?b }
>>>                          FROM < http://example.com/spa
rql?>
>>>                        WHERE { ?b <b> ?d
} )
>>> WHERE { ?a <b> ?b }
>>
>>
>> Yes... the Data Access WG considered this sort of
thing briefly;
>> we didn't see any particular reason not to do it
but we...
>>
>> RESOLVED 2005-01-20: to postpone cascadedQueries;
while federation  
>> use
>> cases are interesting, the designs don't seem
mature and the use  
>> cases
>> are not urgent; with KendallC abstaining.
>> http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries
>>
>> I'm happy to see people playing around with it; I
hope the
>> designs get mature soonish.
>>
>>
>> --
>> Dan Connolly, W3C http://www.w3.org/
People/Connolly/
>>
>>



Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United States
2007-11-04 06:38:47
Good point. Perhaps FROM ENDPOINT.

-Alan

On Nov 4, 2007, at 7:35 AM, Steve Harris wrote:

> On 4 Nov 2007, at 04:09, Alan Ruttenberg wrote:
>
>> This is a particularly easy one, since it adds no
new  
>> expressivity. The form
>> below can be syntactically transformed into SPARQL
as specified  
>> now by way
>> of using the SPARQL protocol for the construct in
the FROM.
>> Since this is the only reasonable way we have to do
federation  
>> now, within
>> spec, it's more like adding friendly syntactic
sugar.
>
> As far as I can tell there's no way to tell that
<http:// 
> example.com/sparql?> is a SPARQL endpoint, rather
that a graph  
> served by a CGI script with no arguments.
>
> - Steve
>
>> On 11/3/07, Dan Connolly <connollyw3.org> wrote:
>>>
>>> Alan Ruttenberg wrote:
>>>>
>>>> SELECT ?a ?b
>>>>  FROM ( CONSTRUCT { ?d <b> ?b }
>>>>                          FROM < http://example.com/spa
rql?>
>>>>                        WHERE { ?b <b>
?d } )
>>>> WHERE { ?a <b> ?b }
>>>
>>>
>>> Yes... the Data Access WG considered this sort
of thing briefly;
>>> we didn't see any particular reason not to do
it but we...
>>>
>>> RESOLVED 2005-01-20: to postpone
cascadedQueries; while  
>>> federation use
>>> cases are interesting, the designs don't seem
mature and the use  
>>> cases
>>> are not urgent; with KendallC abstaining.
>>> http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries
>>>
>>> I'm happy to see people playing around with it;
I hope the
>>> designs get mature soonish.
>>>
>>>
>>> --
>>> Dan Connolly, W3C http://www.w3.org/
People/Connolly/
>>>
>>>
>



Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United States
2007-11-04 06:48:13
Although I intended that the specification of this was that
it was  
only legal for an endpoint, as that's what makes it easy.
I'm not  
sure it's a useful construct otherwise, as you don't need it
nested  
in the FROM if you have to download the file.
-Alan


On Nov 4, 2007, at 7:38 AM, Alan Ruttenberg wrote:

> Good point. Perhaps FROM ENDPOINT.
>
> -Alan
>
> On Nov 4, 2007, at 7:35 AM, Steve Harris wrote:
>
>> On 4 Nov 2007, at 04:09, Alan Ruttenberg wrote:
>>
>>> This is a particularly easy one, since it adds
no new  
>>> expressivity. The form
>>> below can be syntactically transformed into
SPARQL as specified  
>>> now by way
>>> of using the SPARQL protocol for the construct
in the FROM.
>>> Since this is the only reasonable way we have
to do federation  
>>> now, within
>>> spec, it's more like adding friendly syntactic
sugar.
>>
>> As far as I can tell there's no way to tell that
<http:// 
>> example.com/sparql?> is a SPARQL endpoint,
rather that a graph  
>> served by a CGI script with no arguments.
>>
>> - Steve
>>
>>> On 11/3/07, Dan Connolly <connollyw3.org> wrote:
>>>>
>>>> Alan Ruttenberg wrote:
>>>>>
>>>>> SELECT ?a ?b
>>>>>  FROM ( CONSTRUCT { ?d <b> ?b }
>>>>>                          FROM < http://example.com/spa
rql?>
>>>>>                        WHERE { ?b
<b> ?d } )
>>>>> WHERE { ?a <b> ?b }
>>>>
>>>>
>>>> Yes... the Data Access WG considered this
sort of thing briefly;
>>>> we didn't see any particular reason not to
do it but we...
>>>>
>>>> RESOLVED 2005-01-20: to postpone
cascadedQueries; while  
>>>> federation use
>>>> cases are interesting, the designs don't
seem mature and the use  
>>>> cases
>>>> are not urgent; with KendallC abstaining.
>>>> http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries
>>>>
>>>> I'm happy to see people playing around with
it; I hope the
>>>> designs get mature soonish.
>>>>
>>>>
>>>> --
>>>> Dan Connolly, W3C http://www.w3.org/
People/Connolly/
>>>>
>>>>
>>
>



Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United Kingdom
2007-11-04 06:55:06
Well, that would be the obvious syntax for a local sub-query
too.

- Steve

On 4 Nov 2007, at 12:48, Alan Ruttenberg wrote:

> Although I intended that the specification of this was
that it was  
> only legal for an endpoint, as that's what makes it
easy. I'm not  
> sure it's a useful construct otherwise, as you don't
need it nested  
> in the FROM if you have to download the file.
> -Alan
>
>
> On Nov 4, 2007, at 7:38 AM, Alan Ruttenberg wrote:
>
>> Good point. Perhaps FROM ENDPOINT.
>>
>> -Alan
>>
>> On Nov 4, 2007, at 7:35 AM, Steve Harris wrote:
>>
>>> On 4 Nov 2007, at 04:09, Alan Ruttenberg
wrote:
>>>
>>>> This is a particularly easy one, since it
adds no new  
>>>> expressivity. The form
>>>> below can be syntactically transformed into
SPARQL as specified  
>>>> now by way
>>>> of using the SPARQL protocol for the
construct in the FROM.
>>>> Since this is the only reasonable way we
have to do federation  
>>>> now, within
>>>> spec, it's more like adding friendly
syntactic sugar.
>>>
>>> As far as I can tell there's no way to tell
that <http://example.com/sparql?
 
>>> > is a SPARQL endpoint, rather that a graph
served by a CGI script  
>>> with no arguments.
>>>
>>> - Steve
>>>
>>>> On 11/3/07, Dan Connolly <connollyw3.org> wrote:
>>>>>
>>>>> Alan Ruttenberg wrote:
>>>>>>
>>>>>> SELECT ?a ?b
>>>>>> FROM ( CONSTRUCT { ?d <b> ?b
}
>>>>>>                         FROM <
http://example.com/spa
rql?>
>>>>>>                       WHERE { ?b
<b> ?d } )
>>>>>> WHERE { ?a <b> ?b }
>>>>>
>>>>>
>>>>> Yes... the Data Access WG considered
this sort of thing briefly;
>>>>> we didn't see any particular reason not
to do it but we...
>>>>>
>>>>> RESOLVED 2005-01-20: to postpone
cascadedQueries; while  
>>>>> federation use
>>>>> cases are interesting, the designs
don't seem mature and the use  
>>>>> cases
>>>>> are not urgent; with KendallC
abstaining.
>>>>> http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries
>>>>>
>>>>> I'm happy to see people playing around
with it; I hope the
>>>>> designs get mature soonish.
>>>>>
>>>>>
>>>>> --
>>>>> Dan Connolly, W3C http://www.w3.org/
People/Connolly/
>>>>>
>>>>>
>>>
>>
>



Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United States
2007-11-04 07:05:13
Is there a reason one would like to do a local subquery?
Isn't it  
equivalent to something that you could write at top level
with about  
the same number of characters?

-Alan

On Nov 4, 2007, at 7:55 AM, Steve Harris wrote:

> Well, that would be the obvious syntax for a local
sub-query too.
>
> - Steve
>
> On 4 Nov 2007, at 12:48, Alan Ruttenberg wrote:
>
>> Although I intended that the specification of this
was that it was  
>> only legal for an endpoint, as that's what makes it
easy. I'm not  
>> sure it's a useful construct otherwise, as you
don't need it  
>> nested in the FROM if you have to download the
file.
>> -Alan
>>
>>
>> On Nov 4, 2007, at 7:38 AM, Alan Ruttenberg wrote:
>>
>>> Good point. Perhaps FROM ENDPOINT.
>>>
>>> -Alan
>>>
>>> On Nov 4, 2007, at 7:35 AM, Steve Harris
wrote:
>>>
>>>> On 4 Nov 2007, at 04:09, Alan Ruttenberg
wrote:
>>>>
>>>>> This is a particularly easy one, since
it adds no new  
>>>>> expressivity. The form
>>>>> below can be syntactically transformed
into SPARQL as specified  
>>>>> now by way
>>>>> of using the SPARQL protocol for the
construct in the FROM.
>>>>> Since this is the only reasonable way
we have to do federation  
>>>>> now, within
>>>>> spec, it's more like adding friendly
syntactic sugar.
>>>>
>>>> As far as I can tell there's no way to tell
that <http:// 
>>>> example.com/sparql?> is a SPARQL
endpoint, rather that a graph  
>>>> served by a CGI script with no arguments.
>>>>
>>>> - Steve
>>>>
>>>>> On 11/3/07, Dan Connolly
<connollyw3.org> wrote:
>>>>>>
>>>>>> Alan Ruttenberg wrote:
>>>>>>>
>>>>>>> SELECT ?a ?b
>>>>>>> FROM ( CONSTRUCT { ?d <b>
?b }
>>>>>>>                         FROM
< http://example.com/spa
rql?>
>>>>>>>                       WHERE {
?b <b> ?d } )
>>>>>>> WHERE { ?a <b> ?b }
>>>>>>
>>>>>>
>>>>>> Yes... the Data Access WG
considered this sort of thing briefly;
>>>>>> we didn't see any particular reason
not to do it but we...
>>>>>>
>>>>>> RESOLVED 2005-01-20: to postpone
cascadedQueries; while  
>>>>>> federation use
>>>>>> cases are interesting, the designs
don't seem mature and the  
>>>>>> use cases
>>>>>> are not urgent; with KendallC
abstaining.
>>>>>> http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries
>>>>>>
>>>>>> I'm happy to see people playing
around with it; I hope the
>>>>>> designs get mature soonish.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dan Connolly, W3C http://www.w3.org/
People/Connolly/
>>>>>>
>>>>>>
>>>>
>>>
>>
>



Re: SPARQL vnext new feature? cascadedQueries
country flaguser name
United Kingdom
2007-11-04 07:29:26
Not all subqueries have an equivalent, at least not in SQL.

- Steve

On 4 Nov 2007, at 13:05, Alan Ruttenberg wrote:

> Is there a reason one would like to do a local
subquery? Isn't it  
> equivalent to something that you could write at top
level with about  
> the same number of characters?
>
> -Alan
>
> On Nov 4, 2007, at 7:55 AM, Steve Harris wrote:
>
>> Well, that would be the obvious syntax for a local
sub-query too.
>>
>> - Steve
>>
>> On 4 Nov 2007, at 12:48, Alan Ruttenberg wrote:
>>
>>> Although I intended that the specification of
this was that it was  
>>> only legal for an endpoint, as that's what
makes it easy. I'm not  
>>> sure it's a useful construct otherwise, as you
don't need it  
>>> nested in the FROM if you have to download the
file.
>>> -Alan
>>>
>>>
>>> On Nov 4, 2007, at 7:38 AM, Alan Ruttenberg
wrote:
>>>
>>>> Good point. Perhaps FROM ENDPOINT.
>>>>
>>>> -Alan
>>>>
>>>> On Nov 4, 2007, at 7:35 AM, Steve Harris
wrote:
>>>>
>>>>> On 4 Nov 2007, at 04:09, Alan
Ruttenberg wrote:
>>>>>
>>>>>> This is a particularly easy one,
since it adds no new  
>>>>>> expressivity. The form
>>>>>> below can be syntactically
transformed into SPARQL as specified  
>>>>>> now by way
>>>>>> of using the SPARQL protocol for
the construct in the FROM.
>>>>>> Since this is the only reasonable
way we have to do federation  
>>>>>> now, within
>>>>>> spec, it's more like adding
friendly syntactic sugar.
>>>>>
>>>>> As far as I can tell there's no way to
tell that <http://example.com/sparql?
 
>>>>> > is a SPARQL endpoint, rather that
a graph served by a CGI  
>>>>> script with no arguments.
>>>>>
>>>>> - Steve
>>>>>
>>>>>> On 11/3/07, Dan Connolly
<connollyw3.org> wrote:
>>>>>>>
>>>>>>> Alan Ruttenberg wrote:
>>>>>>>>
>>>>>>>> SELECT ?a ?b
>>>>>>>> FROM ( CONSTRUCT { ?d
<b> ?b }
>>>>>>>>                        FROM
< http://example.com/spa
rql?>
>>>>>>>>                      WHERE
{ ?b <b> ?d } )
>>>>>>>> WHERE { ?a <b> ?b }
>>>>>>>
>>>>>>>
>>>>>>> Yes... the Data Access WG
considered this sort of thing briefly;
>>>>>>> we didn't see any particular
reason not to do it but we...
>>>>>>>
>>>>>>> RESOLVED 2005-01-20: to
postpone cascadedQueries; while  
>>>>>>> federation use
>>>>>>> cases are interesting, the
designs don't seem mature and the  
>>>>>>> use cases
>>>>>>> are not urgent; with KendallC
abstaining.
>>>>>>> http://www.w3.org/2001/sw/DataAccess/issues#cascadedQ
ueries
>>>>>>>
>>>>>>> I'm happy to see people playing
around with it; I hope the
>>>>>>> designs get mature soonish.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dan Connolly, W3C http://www.w3.org/
People/Connolly/
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>
>>
>



[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )