Compress ODB file with XML content


Harman company requested to reduce ODB size as much as possible after database created and one of unliked solution was to use ZIP/UNZIP after/before use object DB database. Harman would like to ask Object Db team about possible internal methods to reduce/compress object DB data on run-time or after close ODB file. Does exist any compress data solution from ObjectDB side?

ZIP is able to reduce ODB size up to 50 times.

Additional info:

Harman Ltd.

An ObjectDB database is expected to be larger than the data in compressed form, because is it is designed for speed and not for minimum storage space, but compression ratio of 1:50 does look extreme.

Compression internally is not supported yet, but if you can upload a sample database file we can explore it and maybe we can suggest possible improvements.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

According to ObjectDb team request, uploaded 100 Mb (compressed to 3 Mb) log example for further investigation from ObjectDb side.

Harman Ltd.

Thank you for the sample database file.

Most of the database space is used by field value in entity class LogVolatileEntityImpl, which contains XML with a very high compression potential. Do you use that field in queries? If not, you may be able to store the content compressed with no need to wait for ObjectDB compression support. You can define a new persistent field, e.g compressedValue, and store the compressed content in that field. The old value field can remain empty in the database, and using JPA events you can initialize value by uncompressing compressedValue on PostLoad and setting compressedValue by compressing value on PrePersist and PreUpdate.

Another improvement can be achieved by replacing the fields context and name (which have repeating values), with enum or references to separate entity objects that wrap theses string (eliminating duplicated content).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login