concurrent DB access and transactons at same time??

concurrent DB access and transactons at same time??

Post by berkeleydb_use » Thu, 07 Apr 2005 07:16:22

am a newbie to BerkeleyDB. Can DB support transactions ie., ACID while
multiple processes or threads are accessing the database at same time.

the docs says:

To create Berkeley DB Concurrent Data Store applications, you must
first initialize an environment by calling DB_ENV->open. You must
specify the DB_INIT_CDB and DB_INIT_MPOOL flags to that method. It is
an error to specify any of the other DB_ENV->open subsystem or recovery
configuration flags, for example, DB_INIT_LOCK, DB_INIT_TXN, or

does it mean that i can't have transaction support at the same time
when multiple threads/processes are reading/writing the database.



concurrent DB access and transactons at same time??

Post by Michael Cahil » Thu, 07 Apr 2005 10:02:12

Yes, you can have multiple processes sharing transactional
environments.  Each process can also be multithreaded.  That is the
Berkeley DB Transactional Data Store product, which sounds like it's
what you need.

The Concurrent Data Store product offers a simpler concurrency model
without trasactions, but it still allows multiple processes to share an

Please see this page fr more information:



1. transaction db without concurrent access

Hi there,

My application consists of multiple threads, each of which has a
separate database. Each thread will access its own database and will
never access other threads' database. And I do need transaction
support. Do I have to use the locking sytems, although the application
threads will not mess up with each other? Can i use a transaction
database without DB_INIT_LOCK?

Another question about the size of BerkeleyDB lib. I just compiled the
4.2.52 distribution for vxWorks5.4 with level 2 optimization -O2. the
size is 1153289
a little over 1MB. From what I have read, it should be around
300k~400k range, right? The following is the compilation flags I used.
Shoulf i use other settings:
-O2 -mstrict-align -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
-fvolatile -fno-builtin -fno-for-scope -mhard-float -I.
-IC:/Tornado/target/h -DCPU=PPC603
-IC:/cygwin/opt/db-4.2.52/build_vxworks -IC:/cygwin/opt/db-4.2.52
-Wall -mlongcall

thanks again

2. mailbox password and OLE from MSOffice

3. Concurrent access to a DB by multi - processes

4. quotacheck and LVM problem

5. Concurrent access to a DB by independent processes

6. Transaction Log

7. HELP: Network Benchmarks w/ DB access times

8. Wellknown Services File

9. Relationship think time, concurrent users, response time and simultaneous users

10. DB->compact in presense of concurrent transactions

11. Hot backup of Berkeley DB Concurrent Data Store

12. DB Env.Type: transactional or concurrent

13. Limiting number of concurrent DB connections