Alternative to BerkeleyDB?

感情迁移 提交于 2019-12-02 14:14:48
Simon Schmidt

C/C++

Java

Phillip B Oldham

You could look at Tokyo Cabinet. Its the successor to qdbm/gdbm, and if you decide to scale has a nice network front-end available.

Edit:

Another variant is Kyoto Cabinet; developed by the same person, but supposedly easier to use.

SQLite is public domain, meaning you can use it for any purpose whatsoever, and is widely used and supported.

You can get much improved performance out of any dbm (even qdbm) and improved parallelism with a simple level of indirection: Simply take your keys and hash them, and use data_dir/H(key)/ as the database to store those keys. Limit the hash output to a small value (say) 255 for best results.

This approach has a number of benefits, easily summarized:

  • Conceptually simple
  • Easy to implement and test
  • Doesn't lock the entire database for updates
  • Can support much larger databases
  • Easy to replace the DBM component

The hash probably doesn't even need to be cryptographically secure; just mostly uniform. DJB's cdb hash works well in most cases.

If you are on Windows then you can use the builtin esent database engine. http://blogs.msdn.com/windowssdk/archive/2008/10/23/esent-extensible-storage-engine-api-in-the-windows-sdk.aspx

You could try JDBM. It is a free (Apache 2) key-value store with disk persistence. Simple API and high performance

Postgres or HSQLDB and possible even H2 database

db4o is pretty cheap and fast but it can only be used with java or .net

Firebird is your best friend.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!