bsddb package - I'm confused, need help

M

Mike Moum

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).

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.

Can anyone help, or point me to some documentation that will explain
these things?

Thanks,
Mike
 
J

Jp Calderone

Mike said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top