bsddb package - I'm confused, need help
Jp Calderone
exarkun at divmod.com
Fri Jul 16 07:52:03 EDT 2004
Mike Moum wrote:
> Greetings all,
>
> I have some questions about the bsddb package that comes with Python 2.3
> that I can't find answers for. I've googled and read the documentation.
>
> 1. Does the Berkeley database from Sleepycat need to be installed
> separately from Python, or is it included? The documentation states
> that bsddb requires the Berkeley DB library 3.1 or later, but it seems
> to work without it (on Debian, at least - I don't think it's installed).
>
It is. Debian has a great package dependency system.
> 2. My anticipated application requires several users to access the same
> database. I can open the same database with several users, but changes
> made by one user don't show up in the other user's data, and whoever
> closes the database last gets the "final say", as it were - their data
> overwrites the data of the users that closed before them. I suspect the
> DBEnv function is needed somehow, but I can't figure out how to make it
> work. I do not get enlightenment from the updated documentation on
> Sourceforge.
You almost certainly want to use DBEnv even if you don't care about
concurrent access. You also want to initialize the transaction
subsystem. There's also a hundred other important details. For a
wrapper with fewer pointy edges, you may want to take a look at atop.
It isn't finished or individually packaged/released, but at the very
least it will be an educational read.
http://www.divmod.org/Home/Projects/Atop/index.html
>
> Can anyone help, or point me to some documentation that will explain
> these things?
The Sleepycat documentation is quite complete. Reading all of
http://www.sleepycat.com/docs/ref/toc.html is not a bad idea. There is
also a Berkeley DB usenet group, comp.databases.berkeley-db, where a lot
of smart, experienced people hang out :)
Jp
More information about the Python-list
mailing list