Hi,
I'm looking for a Java (or Groovy) solution for managing static data i.e. data in infrequently changing tables such as a list of countries.
I would like to keep the list of countries in a text file and have the tables automatically updated when the server starts. I can't simply delete all the tables, then re-insert the data in the text files because this would violate key constraints.
DbUnit is a library which supports loading data into a DB from an XML file. It has a refresh operation which almost does what I need. This will insert any rows that are in the file but not in the DB, update any rows in the DB which are also in the file, but it doesn't delete any rows that are in the DB but not in the file.
Has anyone found a good solution for this problem?
Thanks, Don