You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Site Guo <gu...@hotmail.com> on 2013/04/03 15:32:49 UTC

List of Datasets?

How can I get a list of datasets in a TDB store, just like the 'Show Databases' command in MySQL? Is there a API method for doing that?

Thanks,
Site (Victor) Guo

 		 	   		  

Re: List of Datasets?

Posted by Paul Gearon <ge...@ieee.org>.
On Wed, Apr 3, 2013 at 7:23 PM, Rob Vesse <rv...@yarcdata.com> wrote:

> I think the following should also work and be more efficient
>
> SELECT ?g WHERE { GRAPH ?g { } }
>
> It requires TDB to touch less of the indexes if memory serves
>
> Rob


Quite true, and that is the form recommended by Andy in the past.

(the {?s ?p ?o} pattern is a legacy stuck in my head from previous systems
I've worked with)

Paul

Re: List of Datasets?

Posted by Rob Vesse <rv...@yarcdata.com>.
I think the following should also work and be more efficient

SELECT ?g WHERE { GRAPH ?g { } }

It requires TDB to touch less of the indexes if memory serves

Rob



On 4/3/13 12:20 PM, "Paul Gearon" <ge...@ieee.org> wrote:

>Datasets are a dynamic construct, built out of a collection of graphs. You
>define the dataset that you're querying from in a query or with the
>protocol.
>
>To get a list of graphs you can use the following:
>
>SELECT ?g WHERE { GRAPH ?g { ?s ?p ?o } }
>
>Paul
>
>On Wed, Apr 3, 2013 at 9:32 AM, Site Guo <gu...@hotmail.com> wrote:
>
>> How can I get a list of datasets in a TDB store, just like the 'Show
>> Databases' command in MySQL? Is there a API method for doing that?
>>
>> Thanks,
>> Site (Victor) Guo
>>
>>


Re: List of Datasets?

Posted by Paul Gearon <ge...@ieee.org>.
Datasets are a dynamic construct, built out of a collection of graphs. You
define the dataset that you're querying from in a query or with the
protocol.

To get a list of graphs you can use the following:

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

Paul

On Wed, Apr 3, 2013 at 9:32 AM, Site Guo <gu...@hotmail.com> wrote:

> How can I get a list of datasets in a TDB store, just like the 'Show
> Databases' command in MySQL? Is there a API method for doing that?
>
> Thanks,
> Site (Victor) Guo
>
>