Is it possible to use the bdb file (berkeley db) created by the c-implementation (python bsddb) in oracle berkeley db java edition?

I have a berkeley db file (* .bdb) that is created by the C implementation (python bsddb module). Is it possible to read this file with a pure java implementation of Berkeley Db? I tried to read it using berkeley db java edition (je) but could not. je throws an exception, stating that he cannot find the berkeley database. Are db berkeley files not interoperable in different implementations? If so, why?

+4
source share
3 answers

Please note that there are three different products.

  • Berkeley DB - Implementation C
  • Berkeley DB Java Edition
  • Berkeley DB XML

see Wikipedia

It is true that Berkeley DB and Berkeley DB Java Edition have a different (that is, incompatible) file format. However, Berkeley DB provides the Java API through the JNI. Thus, you can access the data file written by the C implementation from Java, but not the Berkeley DB Java Edition.

+1
source

I have not researched a specific answer, but I have the same experience. A database created using pythons bdb and also accessible using cli utils is not detected by the Java API at all. The converse is also true.

0
source

Source: https://habr.com/ru/post/1277682/


All Articles