[Mulgara-general] Mulgara SPARQL default dataset

David Bigwood dbigwood at metatomix.com
Mon Dec 29 17:57:27 UTC 2008


Thank you for the feedback Paul.

>From my understanding of your reply:

1. The default dataset as used by SPARQL is always empty and will return no
rows unless a named graph is referenced either by the FROM or GRAPH usage.

2. There is no way to query across ALL "documents" stored in a mulgara
server instance.

Our problem is that the process doing the querying, is not the same as the
process storing the documents, which can come from lots of different
sources. Documents are generally not stored into a single URI - so we
basically do not know the document URI at query time and cannot put it in
the SPARQL - in fact we do not want to as we want to query across all
documents. Are we out of luck here with mulgara as it stands now or am I
missing something from your explanation below?

Also, I am not sure what you are saying by "can always be overridden by the
connection" below.

Many thanks
-David




On 12/27/08 4:12 PM, "Paul Gearon" <gearon at ieee.org> wrote:

> 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
> _______________________________________________
> Mulgara-general mailing list
> Mulgara-general at mulgara.org
> http://mulgara.org/mailman/listinfo/mulgara-general

-- 
David Bigwood
Metatomix, Inc.
3 Allied Drive, Suite 210
Dedham, MA 02026
(781) 907-6760 work
(617) 671-5855 cell
dbigwood at metatomix.com








More information about the Mulgara-general mailing list