wood burning stoves 2.0*
The moose likes JDBC and the fly likes Access Berkeley DB Files (DBM) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Access Berkeley DB Files (DBM)" Watch "Access Berkeley DB Files (DBM)" New topic

Access Berkeley DB Files (DBM)

Andrew Patzer
Ranch Hand

Joined: Jul 11, 2002
Posts: 30
Can someone help point me to a very simple way to access Berkeley DB files? We have a set of DBM files that I'd like to use in a Java program. I've identified a few possibilities, none of which I'm that crazy about. Is there a JDBC driver available? Is there a Java API to walk through the file?

It appears that I can build a set of Java classes from the Berkeley DB source code that may be of use, but I'd rather find an easier solution.


Andrew Patzer

Andrew Patzer<br /> <br />Author of: <br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/1590590201/ref=ase_electricporkchop/103-9402848-9855031" target="_blank" rel="nofollow">JSP Examples and Best Practices</a><br /> <br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1590594118/qid=1109107718/sr=1-7/ref=sr_1_7/104-5148852-3564711?v=glance&s=books" target="_blank" rel="nofollow">Foundations of JSP Design Patterns</a>
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30075

Unfortunately, there isn't a JDBC driver available.

This java.net article explains why in detail. The short answer is:
If you're wondering why there isn't a JDBC driver, the short answer is that Berkeley DB isn't a relational database.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Andrew Patzer
Ranch Hand

Joined: Jul 11, 2002
Posts: 30
Thanks. I figured I didn't have many options. Rather than write a JNI wrapper, I think I'll just have to write a Perl script for this function until we can replace the DBM files with something else.
I agree. Here's the link: http://aspose.com/file-tools
subject: Access Berkeley DB Files (DBM)
Similar Threads
how to solve the data problem when we don't have backend database support?
UnsatisfiedLink error
files storage location
Database installation on Android
Stylus Studio XQuery Tools for Berkeley DB XML 2.0