Search code examples
javaubuntu-14.04berkeley-dbifc

Viewing database from db files [BerkeleyDB]


I am playing with an open source project Bim Server and I checked out the code from git. When Bim server is started it creates home/database folder and inside database folder following files available,

lp:/media/isuru/Projects/bimServer/home/database$ ll 
total 672 
drwx------ 1 isuru isuru   4096 අප්‍රි  17 18:06 ./ 
drwx------ 1 isuru isuru   4096 අප්‍රි  17 18:06 ../
-rw------- 1 isuru isuru 641810 අප්‍රි  17 18:54 00000000.jdb
-rw------- 2 isuru isuru   6079 අප්‍රි  17 18:02 je.config.csv
-rw------- 2 isuru isuru      0 අප්‍රි  17 18:02 je.info.0
-rw------- 2 isuru isuru      0 අප්‍රි  17 18:06 je.info.0.lck
-rw------- 1 isuru isuru      0 අප්‍රි  17 18:02 je.lck
-rw------- 2 isuru isuru  28527 අප්‍රි  17 18:54 je.stat.csv

Now what I'm trying to see, how the data are stored in this berkeley db. Is there tools for this?

And I could find this question on stack overlfow but its not answered as well.


Solution

  • BerkeleyDB is an embedded key-value store. It runs inside the application that uses it. On disk, the records may be stored in a binary form that typically makes sense only to the application.

    Usually (but not always, I grant) this means that the best way to query an application's data that's stored in BerkeleyDB is to use that application to query the data. Frequently there are diagnostic commands specific to each application to enable this.

    You can experiment with the db_dump command-line utility, but unless you're quite lucky, the output is likely to be meaningless.