Mailing list ARC-DEV: Archives

Re: [arc-dev] one-to-n relations

From: =?ISO-8859-1?Q?Marian_D=F6rk?= 
Subject: Re: [arc-dev] one-to-n relations
Date: Thu, 2 Oct 2008 15:23:11 -0600


Great. This works well. Thank you!

Marian


Am 02.10.2008 um 04:27 schrieb Keith Alexander:

>
>
> Hi,
>
> The easiest way is to simply swap  SELECT ?name ?email for a =20
> DESCRIBE ?person in your query
> This will bring you back all the properties, including all the email =20=

> addresses, of each person. This will be returned in ARC's simple =20
> index associative array structure.
>
> If you want to be selective about the properties you get back, you =20
> can do a CONSTRUCT instead:
>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> PREFIX foo: <http://bar.com/foo/>
>
> CONSTRUCT {
> ?person foaf:name ?name .
> ?person foo:email ?email .
>
> }
> WHERE {
> ?person a foaf:Person ; foaf:name ?name .
> ?person foo:email ?email .
> }
>
> HTH
>
> Keith
>
> On Wed, 01 Oct 2008 23:16:38 +0100, Marian D=F6rk =20
> <lists@anarchitect.org> wrote:
>
>> Hello everybody,
>>
>> is there a way to have ARC combine multiple results when the entity =20=

>> has multiple relations. For example, i am querying for people and =20
>> their email addresses:
>>
>>
>> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
>> PREFIX foo: <http://bar.com/foo/>
>>
>> SELECT ?name ?email
>> WHERE {
>> ?person a foaf:Person ; foaf:name ?name .
>> ?person foo:email ?email .
>> }
>>
>>
>> Using ARC, people having more than one email would show up multiple =20=

>> times in the row array. However, i would like to have individual =20
>> people just showing up once in the rows array and then  still have =20=

>> the multiple emails associated with the people items. Is this =20
>> possible with one query?
>>
>> I am new to Sparql, so i'm sure there is an established method for =20=

>> this. Thanks for any hints.
>>
>> Cheers,
>> Marian
>>
>>
>
>
>
> --=20
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/