HSQLDB

As I was saying last time, I’ve got quite a bit of configuration data used in the model and I couldn’t figure out a good way to access it quickly and without too much coding. After the EnumMap stuff (which works fine but gets a bit cumbersome if you try and do anything to fancy), I switched to a JDBC connection to Access. Again it works fine but because of how frequently the database needs to be checked, it ends up being really slow.

So I was poking around on the web trying to find a solution and came across HSQLDB. Bit of a mouthful I know, but it really is a fantastic solution to this problem. Why? Because it lets you create an SQL style internal database. That’s right – at the start of my model I load everything in from the Access database, make a copy of it in RAM using HSQLDB, and then use that copy for the rest of the model run. It’s really fast but any changes to the database are lost when the model finishes. At the moment that’s fine but I may add something to periodically write to file.

That’s another sub-version done. Things are coming along quite nicely.

This entry was posted in Modelling. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Archives