[Mulgara-general] Mulgara SPARQL default dataset

Paul Gearon gearon at ieee.org
Sat Dec 27 21:12:22 UTC 2008


On Sun, Dec 28, 2008 at 12:51 AM, David Bigwood <dbigwood at metatomix.com> wrote:
>
> Just started looking at including mulgara as an alternate triple store type
> for our semantic platform. Not got very far yet, so apologies if this
> question is not valid.
>
> Does the SPARQL engine in mulgara support a default dataset,

Yes, since SPARQL requires it. However, the "default" dataset is empty.

> such that when
> you do not specify a named document, or documents, to query from - the whole
> server is queried against (i.e. all documents in the server you are
> connecting to).

But that's not how SPARQL works (to the best of my knowledge). The
standard default isn't specified anywhere, but it can always be
overridden by the "connection". This means that not specifying the
dataset will give different results in different contexts on the same
server.

> I have stored a single document and have queried the store using a simple
> query to return all triples. When I specify the document name all are
> returned when I omit the FROM clause nothing is returned.
>
> SELECT * FROM <test:data> WHERE { ?s ?p ?o } <--- returns rows
> SELECT * WHERE { ?s ?p ?o } <--- returns 0 rows
>
> Can you shed any light for me?

Yup, that's what's supposed to happen.  :-)

What you want is:

SELECT * WHERE { GRAPH ?g { ?s ?p ?o } }

Actually, I haven't tested this, so I don't know if it will work...
let me know if it doesn't.  If it doesn't, there are a couple of
workarounds which should work until I fix it.

Paul



More information about the Mulgara-general mailing list