http://www.perlmonks.org?node_id=938975


in reply to Re^7: Change in Berkeley DB in Perl 5.12?
in thread Change in Berkeley DB in Perl 5.12?

I've been using DB_FIle for over 10 years now. I was aware early on, from experience not intuition, that DBM files can't be ported, and found this was confirmed in one of my early books on Perl, by Martin C Brown in 2001. In that time I've run CGI scripts on various servers and never had any problems until now with DB_FIle.

I don't have administration rights on the server that's running the particular script that had this problem so I couldn't do other than accept the changes that were made. There was no mention made of a change to the version of the DB engine that was going to be used by so I couldn't possibly test what the result of the changes would be beforehand. I did check that the script would run under Perl 5.10, there was nothing in the Changelog to suggest otherwise, but this was using my local version of Perl, the one distributed by ActiveState, which sensibly used version 1 of the DB engine for its DB_File

The documentation for DB_File from which you've already quoted confirms that DB_FIle is intended to be used with version 1 of the DB engine, and while it can be tied to other versions "the interface is limited to the functionality provided by Berkeley DB 1.x". The BerkeleyDB module is the one to use if the features of later versions of the engine are required.

One question perhaps you can answer. Do the other distributions of Perl and this DB_File module come with that module linked to a particular version of the Berkeley DB engine, or is it left to the server administrator to decide which version of the DB engine he/she is going to use?

Replies are listed 'Best First'.
Re^9: Change in Berkeley DB in Perl 5.12?
by flexvault (Monsignor) on Nov 19, 2011 at 16:12 UTC

      Do the other distributions of Perl and this DB_File module come with that module linked to a particular version of the Berkeley DB engine, or is it left to the server administrator to decide which version of the DB engine he/she is going to use?

    If you are using DB_File, it should only be used with Version 1.x which is in the public domain. All other versions from BerkeleyDB 2.0 on, are owned by Oracle. If your version of DB_File is using a version other than 1.x, then there may be licensing and royalty issues.

    I have moved BerkeleyDB data bases from big-endian to little-endian machines without a problem for 3.x versions, but for the 4.x and 5.x (Oracle) versions, I need to export the data and then import the data on the target machine. I never tried it with DB_File, since I have never been able to get DB_File to work correctly in a multi-user environment.

    Hope this helps!

    "Well done is better than well said." - Benjamin Franklin

      If you are using DB_File, it should only be used with Version 1.x which is in the public domain. All other versions from BerkeleyDB 2.0 on, are owned by Oracle. If your version of DB_File is using a version other than 1.x, then there may be licensing and royalty issues.

      BerkeleyDB is dual licensed, under something from oracle, and the original Sleepycat License, which is compatible with the GPL.

        From Oracle: Oracle Berkeley DB Licensing Information

          Oracle employs a dual licensing model that offers customers a choice of either our open source license or a commercial license. Our open source license is OSI-certified and permits use of Berkeley DB in open source projects or in applications that are not distributed to third parties....

          Does it matter if I charge money for my software?

            Whether or not you charge money for your application does not matter. The only test is if you redistribute it.

        You may want to check out the prices?

        Thank you

        "Well done is better than well said." - Benjamin Franklin

Re^9: Change in Berkeley DB in Perl 5.12?
by Anonymous Monk on Nov 21, 2011 at 12:04 UTC

    One question perhaps you can answer. Do the other distributions of Perl and this DB_File module come with that module linked to a particular version of the Berkeley DB engine, or is it left to the server administrator to decide which version of the DB engine he/she is going to use?

    Yes, it is left to the server administrator, as it depends entirely on what version of libdb is installed

    If the system on which it is being installed, doesn't have libdb, then DB_File won't be installed

    If you view http://ppm4.activestate.com/author/PMQS.html you can see, that on some platforms DB_File is available, while it isn't on other platforms

      Sorry I missed your comment earlier. Thanks for that information, that's very interesting.