Search code examples
javajarzipcompressionjavadb

Java- Can we compress a local database and connect the archive with EmbeddedDriver


I want to Compresses my Entire database folder(jar or zip) and connect it with EmbeddedDriver.

  1. Can I do that?

  2. Is there anyway to reduce the size of a database and keep it at a working condition?


Solution

  • You can put your JavaDB/Derby database into a compressed ZIP file. See the Derby Developer Guide: Transferring read-only databases to archive (jar or zip) files.

    But this is only possible for read-only databases.