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