You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by sourajit basak <je...@yahoo.com> on 2011/08/22 07:20:21 UTC
TDB - how much in memory vs disk
I have a requirement where I have created an application ontology. Individuals (instances) will be added/updated/removed based on this ontology. I am using an OntModel backed by TDB.
My questions -
1) As the data keeps on growing, will the entire ontology (classes + instances) be loaded each time I call TDBFactory.createNamedModel(ONT_URI, <directory>));
2) Is there any way to load just the schema (classes + property) definitions and avoid loading any instances ? I can create separate uris for classes and instances but that the instance ontology will soon be out of proportion.
rgds,
Sourajit
RE: how to check an empty resultset
Posted by "Schmitz, Jeffrey A" <Je...@boeing.com>.
You can call hasNext(). Usually you put your row processing within a while loop that checks hasNext()
ResultSet results = qe.execSelect();
while (results.hasNext()) {
QuerySolution next = results.nextSolution();
...
}
> -----Original Message-----
> From: sourajit basak [mailto:jeetbasak@yahoo.com]
> Sent: Wednesday, August 24, 2011 7:35 AM
> To: jena-users@incubator.apache.org
> Subject: how to check an empty resultset
>
> After I execute a SPARQL, is there any way to check if the ResultSet is
> empty ? It seems that there is no easy way but to call nextSolution(..
> and catch the exception.
>
> Maybe I am feeling too sleepy or something important is missing :-))
how to check an empty resultset
Posted by sourajit basak <je...@yahoo.com>.
After I execute a SPARQL, is there any way to check if the ResultSet is empty ? It seems that there is no easy way but to call nextSolution(.. and catch the exception.
Maybe I am feeling too sleepy or something important is missing :-))
Re: TDB - how much in memory vs disk
Posted by Dave Reynolds <da...@gmail.com>.
On 22/08/2011 06:20, sourajit basak wrote:
> I have a requirement where I have created an application ontology. Individuals (instances) will be added/updated/removed based on this ontology. I am using an OntModel backed by TDB.
>
> My questions -
> 1) As the data keeps on growing, will the entire ontology (classes + instances) be loaded each time I call TDBFactory.createNamedModel(ONT_URI,<directory>));
No. The data stays on disk, TDB loads information it needs to scan those
parts of the indexes needed for any query but it does not load the whole
model.
Dave
> 2) Is there any way to load just the schema (classes + property) definitions and avoid loading any instances ? I can create separate uris for classes and instances but that the instance ontology will soon be out of proportion.
>
> rgds,
> Sourajit
>