Re: DISTINCT (was: Re: Queries over multiple graphs)

On Tue, Sep 28, 2004 at 06:19:29 +0100, Andy Seaborne wrote:
> I prefer to have explicit DISTINCT.  I don?t see having SELECT returning 
> duplicate rows contradicting RDF's set of statements if the app writer only 
> wants some of the variables.
> 
> If there is no DISTINCT, then there is there is one result for every way 
> the query can be matched.  Because SELECT can remove variables, it is 
> possible the application can't tell two solutions (table rows, results) 
> apart - but it can if there is "SELECT *" or SELECT with all the variables. 
> "SELECT DISTINCT" means no two results the same even when there fewer 
> variables.  Hence "SELECT DISTINCT *" is a no-op.

Doesnt that assume that every statement in the system is unique at the
triple level? That is not neccesarily the case.
 
> Follwoign on, for optionals, thsi approach suggests a style of one query 
> result row for each way a query can match.
> 
> E.g.: Separate optional blocks, separate variables:
> 
> OPTIONAL ... ?x ....    // does not use ?y
> OPTIONAL ... ?y ....    // does not use ?x
> 
> gives
> 
> ?x = ...    // and no ?y
> ?y = ...    // and no ?x

What about ?x=NULL, ?y=NULL and ?x=... , ?y=..., would those also be valid
solutions? I think I'm not following this part. Possibly a more concrete
example would help.

- Steve 

Received on Tuesday, 28 September 2004 19:55:52 UTC