Ryan wrote:

I am trying to create a database that is embedded within a JAR file and so far I am not having any luck. Here is what I have done so far (mostly by the "book" from the Derby docs).

A word of warning. I posted on something similar - but not identical - about a month ago (I wanted the db in the jar file that had my java app - not possible in my hands) - and ended up zipping the db as the Derby docs explain how to address a zipped db. It worked ok on a toy db, but the real db - derived from a 24Mb mysqldump - ran as slow as treacle. Then we discovered that this was because of the time taken to uncompress the db. Using the 'naked' db was much faster (and it could all still be packaged in as a Mac app, although as yet we haven't got it into a Windows .exe).

While I mention this, could I perhaps raise the remaining speed problem. I made a Derby database with one table, two fields and two tuples (can't get much smaller) and am running it unzipped from a java app that has the simplest gui with a menu with the two fields as menu items and a text area for results. After the GUI has opened the first query takes perhaps five or ten seconds, whereas the subsequent ones are 'instantaneous'. Anyone know why?

David
--
_______________________________________________________________
 David P.Leader, Biochemistry and Molecular Biology
 Davidson Building, University of Glasgow, Glasgow G12 8QQ, UK
 Phone: +44 41 330-5905  http://doolittle.ibls.gla.ac.uk/leader
_______________________________________________________________

Reply via email to