Thanks Dave.

> The former. An OntModel is just an interface onto a base model and the 
> base model in your case is just an interface onto the database. It is 
> not copied into memory


Referring to this page:
http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/ontology/OntModelSpec.html


Description of every OntModelSpec has this part in common "A specification for 
... models that are stored in memory and ..."

I would appreciate if you clarify this conflict for me.

Regards,
Saeed



----- Original Message -----
From: Dave Reynolds <[email protected]>
To: [email protected]
Cc: 
Sent: Friday, March 22, 2013 12:00 PM
Subject: Re: Scalability

On 22/03/13 10:47, Saeed wrote:
> Hello,
>
>
> I have a question regarding Model Interface; I would appreciate if someone 
> helps me.
>
> I’m using SDB and MySQL as tripe store in my application. The following lines 
> are the peace of code which I use to connect to the database and make a Model 
> and OntModel.
>
> SDBConnection conn = newSDBConnection(jdbcConnection) ;
> Store store = StoreFactory.create(storeDesc, conn) ;
> Model model = SDBFactory.connectDefaultModel(store) ;
> OntModel ont = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM,model);
>
> My question is about instantiating a Model and making OntModel using Model.
>
> When a Model instantiated, Is it just an interface to access the contents of 
> database or the whole database contents are already transferred into Model?

The former. An OntModel is just an interface onto a base model and the 
base model in your case is just an interface onto the database. It is 
not copied into memory.

Note that had you specified an OntModelSpec involving inference then the 
inference engine may need to access arbitrary fractions of the stored 
data and the internal inference state is held in memory and can exceed 
the size of the base model.

Without inference you are fine.

Dave

Reply via email to