berkeley-db

Which API in Java to use for file reading to have best performance?

In my place where I work, used to have files with more than million rows per file. Even though the server memory are more than 10GB with 8GB for JVM, sometimes the server get hanged for few moments and chokes the other tasks. I profiled the code and found that while file reading memory use rises in Giga bytes frequently(1GB to 3GB) and ...

Why when using DBM with Ruby, db[1] = 2 is ok, but print db[1] will give error?

On Ruby, when using DBM require "dbm" db = DBM.open("somedata") db[1] = 2 # ok p db[1] # gives error does anyone know db[1] = 2 is ok, but printing out db[1] will give error? If it requires db["1"] to be valid, then how come it doesn't apply to both cases but to one case only? ...

Berkeley DB in multithreaded applications

Hi, What is the best way to use berkeley DB (bdb) handles in a multi-threaded application? Is it better to have each thread open its own handle; or, is it better to open a single handle and have each thread do txn_begin { } txn->commit()? Which one scales better? I am using Transactional Data Store with DB_THREAD flag. Thanks ...

Berkeley DB JE - open cursor count

Is there a way to ask the API for a list of open cursors (or at least a count of the number of currently open cursors) ? ...

Moving a Berkley Db from XP to Ubuntu

I have a bdb database which I have been using on my XP box. I am now migrating most of my apps etc to Linux (Ubuntu 9.10 to be precise). I am not sure that simply moving the db files will work. Has anyone undergone this process of moving a BDB database from the windows platform to Linux before, and if so what is the procedure?. Also, d...

Linking С++ - BDB - LNK2001

BDB is compiled on the same PC, under same VS. #include <db_cxx.h> int main(){ Db b(NULL, 0); return 0; } 1>main.obj : error LNK2001: unresolved external symbol ""public: virtual __thiscall Db::~Db(void)" (??1Db@@UAE@XZ)" 1>main.obj : error LNK2001: unresolved external symbol ""public: __thiscall Db::Db(class DbEnv *,unsigned ...

Best way to use a PostgreSQL database as a simple key value store.

I am being required to use a postgreSQL database and it will replace my current use of berkeleyDB. Although; I realize this is not an ideal situation, it is beyond my control. So the question is... If you were required to make postgreSQL into a key value store how would you go about doing this, while making it as efficient as possible?...

Setting authentication for berkeley-db

How to set the user authentication for my db application in Oracle Berkeley db java edition? ...

berkeleydbje to set authentication

How to set the user authentication on my database application in berkeley db java edition. ...

Trouble with Berkeley DB JE Base API Secondary Databases and Sequences

I have a class Document which consists of Id (int) and Url (String). I would like to have a primary index on Id and secondary index on Url. I would also like to have a sequence for Id auto-incrementation. So I create a SecondaryDatabase and then I create a Sequence. During initialisation of the Sequence I get an exception: Exception in ...

C++: casting to void* and back

* ---Edit - now the whole sourse* When I debug it on the end, "get" and "value" have different values! Probably, I convert to void* and back to User the wrong way? #include <db_cxx.h> #include <stdio.h> struct User{ User(){} int name; int town; User(int a){}; inline int get_index(int a){ return town; } //for another stuff }; int m...

What should I really release as open source when I use Berkeley DB (JE)?

The Berkeley DB (JE) license information says: "...Redistributions in any form must be accompanied by information on how to obtain complete source code for the DB software and any accompanying software that uses the DB software.... For an executable file, complete source code means the source code for all modules it cont...

GUI for Berkeley DB

Hi all, I'm using Berkeley DB Java edition, via the DPL interface. I want to ask if someone knows about any GUI library that could make it easy to browse the data saved in the database. I know that BDB documentation says that the metadata about the stored entities is not saved in any place and therefore only the person who have wri...

How to read Perl DB_Files in Ruby

I'm migrating a Perl script to Ruby. The Perl script uses DB_File in DB_HASH mode. How do I read all the keys and values from such a file in Ruby? ...

Why does my Berkeley DB concurrent data store application hang?

My application hangs when trying to open a concurrent data store (CDB) database for reading: #0 0x0000003ad860b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007ffff7ce67de in __db_pthread_mutex_lock (env=0x610960, mutex=100) at /home/steve/ldm/package/src/Berkeley-DB/dist/../mutex/mut_pthread.c:318...

Has anybody used the Berkeley DB c# bindings for Mono

Has anybody have any experiencing using the Berkeley DB c# bindings in Mono. The current implementation from Oracle using PInvoke to call into a windows DLL(from the looks of it). I know the libdb is available in Linux, but I am not sure if the current c# bindings in mono works with it. Does anybody have experience? mono bindings http:/...

Berkeley DB: What am I doing wrong here?

I wrote a small program to explore using Berkeley DB with C#. using System; using System.Collections.Generic; using System.IO; using System.Text; using BerkeleyDB; namespace bdbtest { class Program { const string dbfile = @"c:\tmp\test.db"; const int nIndexes = 5, nRecords = 500; static SecondaryKeyGenDe...

Expressing multiple columns in berkeley db in python?

Say I have a simple table that contains username, firstname, lastname. How do I express this in berkeley Db? I'm currently using bsddb as the interface. Cheers. ...

Reopen error in bdb 4.7 memory

I create a memory pool with flag(DB_CREATE) after ope a Db_Env with flag(DB_CREATE | DB_INIT_MPOOL |DB_SYSTEM_MEM), when I run their program at first time, it's ok and create some db files such _db.001,_db.002,mpool, but after I close the program and run it again,their make a error said the system cannot find the specified file("Mpool: P...

Must all Concurrent Data Store (CDB) locks be explicitly released when closing a Berkeley DB?

I have an application that comprises multiple processes each accessing a single Berkeley DB Concurrent Data Store (CDB) database. Each process is single-threaded and does no explicit locking of the database. When each process terminates normally, it calls DB->close() and DB_ENV->close(). When all processes have terminated, there shoul...