Re: federation use case

On Wed, Jul 28, 2004 at 11:14:17AM -0400, Eric Prud'hommeaux wrote:
> ===== Executing a Federated Query =====
> 
> To date, my implementations are more simple than the efficient. The
> first query returns a set of results and the second query is
> iteratively performed for each of those results, ala:
> 
> result of first query:
>   +--------------------------+
>   |                    ?mbox |
>   +--------------------------+
>   | <mailto:sue@example.com> |
>   | <mailto:ann@example.com> |
>   | <mailto:joe@example.com> |
>   | <mailto:frd@example.com> |
>   | <mailto:pat@example.com> |
>   +--------------------------+
> 
> following queries:
>   ?w foaf:mbox <mailto:sue@example.com>.
>   ?w foaf:depiction ?pic.

In BRQL I think you could write:

SELECT ?pic
WHERE (?w foaf:mbox ?mb)
      (?w foaf:depiction ?pic)
AND ?mb == <mailto:sue@example.com> ||
    ?mb == <mailto:ann@example.com> ||
    ?mb == <mailto:joe@example.com> ||
    ?mb == <mailto:frd@example.com> ||
    ?mb == <mailto:pat@example.com>

Which would save the roundtrips.

- Steve

Received on Wednesday, 28 July 2004 11:31:57 UTC