Hello

My doubt concerns the piece of code found on the page below, section 5.3.2.

http://sws.ifi.uio.no/semdays2010/05exercises.html

It simply loads a d2r mapping file, a owl ontology, and answers a sparql
query doing inference with pellet (based on rules and axioms present on the
owl ontology). d2r mapping points to a mysql database in my desktop, with 4
fields, 3 of them indexed.

So far so good. However, when it does:

34:      Model d2rData = new ModelD2RQ(readModel(d2r), null);

45:      ontModel.add(d2rData);



I think it dumps all data from d2rq and then adds it to the ontology model.
That's undesirable, because it took 2G of ram to load, and 5 minutes to run
a rather simple query:

SELECT DISTINCT *
{
  ?s a vocab:pacienteCabecaEPescocoEstadio0.
} limit 10


and this class is equivalent to two other classes. I got 8 results, from
3000 instances total.


What I would like to do is to reduce the querying time, and reduce memory
consumption (in this order).

Is there another way to write this code to access d2rq, instead of dumping
all data? I mean, I don't know the internals of pellet, but querying the
sparql endpoint generated by d2r-server for the expanded query (like above,
but specifying the two classes) is so much faster.

If there isn't, I would like to improve the code so it would be like a
server, loading once and answering queries. Would d2r data be out of sync
after the mapped database is updated?

Where do I go now?

Thanks!!




Diogo F.C. PatrĂ£o
Manager of Medical Informatics
Biotechnology Laboratory
Hospital A.C. Camargo
http://www.accamargo.org.br/
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to