- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 02 Jun 2005 09:29:09 -0500
- To: Eric Prud'hommeaux <eric@w3.org>
- Cc: RDF Data Access Working Group <public-rdf-dawg@w3.org>
On Thu, 2005-06-02 at 07:35 -0400, Eric Prud'hommeaux wrote: > This is kind of like a test case for fromUnionQuery, hence the > threading choice. > > Using Named Graphs (rq23) parlance, if I have a dataset: > > default: { } > <lies.rdf>: { <TheMoon> <isMadeOf> <GreenCheese> } > <truth.rdf>: { <TheMoon> <isMadeOf> <Rocks>, <Dirt> } > > and a query: > > SELECT ?stuff > FROM <truth.rdf> > FROM NAMED <lies.rdf> > WHERE { <TheMoon> <isMadeOf> ?stuff } > > I get pretty predictable results: > > | Rocks | > | Dirt | Huh? Above you said the default graph was empty. So you should get no results. Your example has two conflicting descriptions of the dataset. Pick one, please. If you pick the one suggested by the FROM/FROM NAMED parts of the query, you get: default: { <TheMoon> <isMadeOf> <Rocks>, <Dirt> } <lies.rdf>: { <TheMoon> <isMadeOf> <GreenCheese> } <truth.rdf>: { <TheMoon> <isMadeOf> <Rocks>, <Dirt> } > But the default graph need not start out empty. "start out"? datasets don't change. They just are. > If i happen on a default > graph that alreay has <lies.rdf> in it: > > default: { <TheMoon> <isMadeOf> <GreenCheese> } > > and do the same query, I get: > > | Rocks | > | Dirt | > | GreenCheese | > > Thus, if the defualt database *may* be contiminated, you need to fall > back to the more verbose form of provenance constraint: > SELECT ?stuff > FROM <truth.rdf> > FROM NAMED <lies.rdf> > WHERE { GRAPH <truth.rdf> { <TheMoon> <isMadeOf> ?stuff } } > -- Dan Connolly, W3C http://www.w3.org/People/Connolly/ D3C2 887B 0F92 6005 C541 0875 0F91 96DE 6E52 C29E
Received on Thursday, 2 June 2005 14:29:11 UTC