GeeCON Prague 2014*
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


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Access Berkeley DB Files (DBM)" Watch "Access Berkeley DB Files (DBM)" New topic
Author

Access Berkeley DB Files (DBM)

Andrew Patzer
Author
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.

Thanks!

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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30580
    
154

Andrew,
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
Author
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.
 
wood burning stoves
 
subject: Access Berkeley DB Files (DBM)