Many things depend on BDB. When I go to install the prepackaged software for my server, each piece of software seems to want a different version of BerkeleyDB. But it seems when I compile them I can specify a specific BDB version. (The software involved includes Postfix, OpenLDAP, and Cyrus IMAP.)
I use BDB in python projects occaisionally and I have no clue what impact the different versions have on the database file created.
I would like to know the difference between all the different Berkeley DB versions. It seems difficult to find information about the different versions and any API or file format differences, incompatibilities between versions, et cetera.
I know at minimum the following versions exist:
1.85 (a historical version?)
2.x
3.x
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
5.0
Generally, for each release you can find a Change Log in the documentation that gets downloaded with the release. You can also find a history of past releases, as well as upgrade instructions in the Build, Installation and Upgrading Guide here (broken link).
You can also find the list of historic change logs here (archive link for versions 2.1 to 18.1).
As you have discovered, different packages link in different versions of the Berkeley DB library. Usually, the BDB library name includes the release number, so that multiple versions can co-exist on a system at the same time. Since Berkeley DB is used by so many different packages, it is not uncommon to have multiple versions of Berkeley DB on your system.
A quick summary of the major releases/features:
The interim releases add support for additional platforms and other features and enhancements.
Updates for newer versions are noted in the link.