Re: Sparql Question -- re D2R Server publishing the DBLP Bibliography

(Assuming you mean this Richard, rather than Richard Cyganiak.)

A first stab:


Q1: Select names of authors who have not authored  
ex:thePublicationWeAreConsidering:

PREFIX ex: <http://example.com/>
SELECT DISTINCT ?name WHERE {
   ?author ex:hasName ?name .
   OPTIONAL {
     ?pub ex:hasAuthor ?author .
   }
   FILTER (!bound(?pub) || (?pub != ex:thePublicationWeAreConsidering))
}


Q2 I would perform by two queries:

SELECT DISTINCT ?pub {
   ?pub ex:associatedWith ex:fu-berlin .
}

SELECT DISTINCT ?name {
   ?author ex:authored <...> .   # for each publication
   ?author ex:hasName ?name .
}

but there may be a way to do it through multiple nested optionals.

SPARQL is not the best tool for every job.

-R



On  11 Nov 2006, at 12:26 PM, Adrian Walker wrote:

> Hi Richard --
>
> Actually, the question is a more general one about closed world  
> negation, universal quantifiers, and sparql.
>
> So, how would you express in sparql Q1 and Q2 generalized by  
> dropping the author affiliation "fu-berlin" part?
>
> Thanks,   -- Adrian
>
> Internet Business Logic (R)
> Executable open vocabulary English
> Online at www.reengineeringllc.com
> Shared use is free
>
> Adrian Walker
> Reengineering
> Phone: USA 860 830 2085
>
>
>
> On 11/11/06, Richard Cyganiak <richard@cyganiak.de> wrote:
>
> On 11 Nov 2006, at 20:00, Richard Newman wrote:
> >> So I'm wondering please whether it is possible to write in sparql
> >> queries equivalent to
> >>
> >>      Q1  show me the name of a person who is missing from the list
> >> of authors of a publication from fu-berlin
> >>
> >>      Q2  show me the names of people who are on the list of
> >> authors of every publication from fu-berlin
> >>
> >> Thanks for your thoughts about this, in particular, actual sparql
> >> queries.
> >>
> >>                                                                --
> >> Adrian
> >>
> >
> > I'll allow Chris to provide some real queries, as I'm unfamiliar
> > with the details of the ontology.
>
> Unfortunately the original DBLP dataset does not contain author
> affiliations. Therefore we can't answer this kind of query.
>
> Richard
>
>
>
> >
> > -R
> >
> >
>
>

Received on Saturday, 11 November 2006 21:09:34 UTC