Re: Limiting a query by setting a maximum number of distinct values for a given variable.

Thanks for all your comments.
I am now wondering about a few things and would appreciate your feedback:

the use case I present is, in my opinion, very classic.
Most UIs dealing with a big set of data display them in a page-based manner.

Steve proposes the application layer to handle the mismatch between
the LIMIT/OFFSET
queries and the page-based UI.

If the only usage of the application layer is to refactor result
sets'rows into page-based UIs, then
an interesting alternative is to include the page-based query feature
in the SPARQL spec.
Any opinion?

What could be the technical issues of such a proposal?
As far as I understand, it is just an alternative way for the DB to
count the number of data
to return. Not a big deal, it seems, and it would avoid some tricky
coding at the application layer.


PS: I think SQL does not provide any better alternative, beyond
(tedious to write) subqueries. True?






On Sat, Oct 16, 2010 at 1:11 PM, Alexandre Passant
<alexandre.passant@deri.org> wrote:
> Hi Damian,
>
>
> On 16 Oct 2010, at 10:51, Damian Steer wrote:
>
>>
>> On 15 Oct 2010, at 21:23, Olivier Rossel wrote:
>>
>>> Is there a way to constrain my SPARQL queries to return all the data for the
>>> first 100 towns, then all the data for the second 100 towns, etc ?
>>>
>>> Note: oh, by the way, in my app, I use CONSTRUCT and SELECT ! I don't know if
>>> that is an important point. But anyway... :)
>>
>> It is important since you could do this using describe :-)
>>
>> DESCRIBE ?town {
>>   ...
>> } LIMIT 100
>>
>> One of the many things I like about describe.
>>
>
> One issue here: DESCRIBE is implementation specific.
> So while most endpoints will deliver all ?p ?o triples with ?town as a subject (even ?s ?p and ?town as object), you cannot be sure that all services will return the same thing.
>
> However, in Olivier's case, I guess you're working with a single implementation so that may be ok.
>
> Alex.
>
>> Damian
>>
>
> --
> Dr. Alexandre Passant
> Digital Enterprise Research Institute
> National University of Ireland, Galway
> :me owl:sameAs <http://apassant.net/alex> .
>
>
>
>
>
>
>

Received on Tuesday, 19 October 2010 09:31:58 UTC