Search code examples
sqlmysqloraclejdbcdump

Database agnostic jdbc table import/export to files?


Is it at all possible to do database-agnostic table dumps/hydrates? I don't have any complicated constraints. I would also settle for db-specific ways, but the more pure jdbc it is the better (I don't want to resort to impdp/expdp).


Solution

  • Have a look at DBUnit. DBUnit support exporting to a xml file, and importing from a xml file. Their faq has some advice on how to make the export / imports fast, be sure to check that out.