- From: Axel Polleres <axel.polleres@deri.org>
- Date: Tue, 26 May 2009 14:17:56 +0100
- To: Simon Schenk <sschenk@uni-koblenz.de>
- CC: Steve Harris <steve.harris@garlik.com>, "Seaborne, Andy" <andy.seaborne@hp.com>, Ivan Mikhailov <imikhailov@openlinksw.com>, "public-rdf-dawg@w3.org" <public-rdf-dawg@w3.org>
Simon Schenk wrote:
> Am Dienstag, den 26.05.2009, 13:12 +0100 schrieb Axel Polleres:
>
>> When thinking about subqueries in FILTERs instead of just as
>> UNSAID/NOTEXISTS, I had rather thought about use cases where the
>> subquery appears in a complex filter expression...
>>
>>
>> E.g. let's say you look for persons who don't have an email address
>> (foaf:mbox) but an foaf:mbox_sha1sum or a foaf:homepage.
>>
>>
>> SELECT ?x
>> { ?x a foaf:Person
>> FILTER ( ! EXISTS{ ?x foaf:mbox [] }
>> && ( EXISTS{ ?x foaf:mbox [] }
>> || EXISTS{ ?x foaf:homepage [] } ) )
>> }
>>
>>
>> How'd you write that with the non-filter version? How'd you write that
>> with the non-filter version? Probably here a version with UNION and
>> UNSAID instead would also not look much nicer.
>
> SELECT ?x
> { ?x a foaf:Person .
> UNSAID {?x foaf:mbox []} .
> { { ?x foaf:mbox_sha1sum }
> UNION
> { ?x foaf:homepage [] }
> }
> }
aehm... you won. :-)
It starts to look to me like that nesting in FILTERs doesn't really have
any advantages. Anybody arguments in favor of the FILTERed version?
Axel
> Cheers,
> Simon
--
Dr. Axel Polleres
Digital Enterprise Research Institute, National University of Ireland,
Galway
email: axel.polleres@deri.org url: http://www.polleres.net/
Received on Tuesday, 26 May 2009 13:18:40 UTC