Hi,
I have read some docs on SPARQL but I'm still quite new to it.
I'm trying to query some records on RISearch (Mulgara store). My triples 
are defined this way:

<resource> <isResourceOf> <object>

<person> <isAuthorOf> <object>

<place> <isBirthPlaceOf> <person>


And so on.

To keep it simple, I would like to get the object which a specified item 
is resource of, and then the person who is the author of that object.

I tried the following SPARQL query:

SELECT ?o ?a

FROM <#ri>

WHERE {

   <info:fedora/AICTEST:DOResImg-G38562> <aic:isResourceOf> ?o.

   ?a <aic:isAuthorOf> ?o .

}


This doesn't fetch any results. Eliminating either triple pattern, I get 
some results - which leads me to think that the query is acting as an 
AND operator, looking for records that satisfy both patterns.

Instead, this:

SELECT ?o ?a
   FROM <#ri>
   WHERE {
     {<info:fedora/AICTEST:DOResImg-G38562> <aic:isResourceOf> ?o }
   UNION
     { ?a <aic:isAuthorOf> ?o } .
   

fetches the resource, along with all the authors of all objects. This 
means to me that the two ?o variables are not linked together.

In other forums, someone told me that the first query should work as I 
expect. Is Mulgara implementing SPARQL differently in this regard? 
Otherwise, how do I achieve my goal?


Thanks,
-- 

Stefano Cossu
Director of Application Services, Collections

The Art Institute of Chicago
116 S. Michigan Ave.
Chicago, IL 60603



------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to