Berkeley DB C# Bindings

Berkeley DB is an excellent Transactional Data Store. Historically it has had a strong C and Java following, but with the recent 4.8 release, they have added C# bindings, finally opening up Berkeley DB to C#.

This is a non-relational database, which is well suited for things like raw tick data, where you are not querying them by values, but instead by an indexed time and symbol field.

To give you an idea of why this is important, take a look at their white paper from 2006 on performance. In a transacted environment they achieved 125,486 single record writes per second. With modern 2009 hardware, and multiple CPU / Solid State Disk systems, this could readily record every single tick coming off of the NYSE and NASDAQ (multiple million per second).

Check them out at Oracle Berkeley DB. I’m in the process of testing this out for our historical logging, and am very impressed so far, even on commodity hardware.

10 Responses to “Berkeley DB C# Bindings”


  • It would be great if you’ll post your conclusions, thanks!

  • It would be great if you’ll post your conclusions, thanks!

  • This looks very interesting, but I was wondering if there
    was a good interface to construct the DB with. One gets a bit spoiled with Micrsoft’s interface in MS Access and SQL.

    The next question becomes: can one use the DB as a data feed. (pump it to the DB and let the apps attach to the DB rather than to IB for quotes). It would be really nice to route prices to multiple apps when one hits IB’s ticker limit. (Suppose you want to track Intel in your SP500, QQQ and DIA application). (Or one could use a abandon IB to different data vendor)

  • Berkeley Db has definitely proven to be useful, but as Robert pointed out – there is no easy interface. Your entire wOO wrapper has to be hand coded, and all of your indices are hand maintained. It is much more difficult than SQL / linq-to-sql, but that’s the price you pay for ridiculous speed.

  • If you are looking at Berkely DB on Windows you could also evaluate the ESENT database engine that is part of Windows. ESENT is the database engine that Active Directory, Microsoft Exchange and several other Windows applications use. Its performance characteristics are similar to Berkely DB. In terms of features the two products have different approaches: Berkeley DB supports replication and multi-process access but is a simple key/value store while ESENT is an embedded database which supports sophisticated meta-data (thousands of tables/columns/indexes, sparse columns, sophisticated indexes), snapshot isolation and non-blocking reads.

    The managed wrapper to the ESENT API is here:

    http://managedesent.codeplex.com/

  • Interesting, I will have to take a closer look. I am a fan of Berkeley Db’s blob nature…

  • I implemented a tick storage server which uses BDB for storage. I also provided a client DLL for accessing it. It’s still very much beta software, but it’s released under the GPL. The only place it’s available on the web right now is: http://www.bigmiketrading.com/ninjatrader-programming/6684-i-stab-gomrecording-db-backend.html#post76982

  • Your thoughts are amazing. Your weblog, not so much. I dont wish to disrespect you, simply hear me out. Add a little bit one thing here. What youre saying is so important itd be a shame if folks missed it because they were bored to death. Could also be a video or a hyperlink to one thing as highly effective as the subject. Only a suggestion.

  • Phentemine375 is the best diet pills that will not just help you suppress your appetite
    but will also ensure that you get you’re using Phen375, as your foodstuff hankering are going to be removed. You could possibly operate a lot of an individual’s behavior, will likely not job.
    Trying this in the better of loss pills, which includes Phen375, are one of the a large number of cool and
    trendy fat reduction goods now. phen375Remind Yourself Of
    Your Goals And The Benefits Of The Diet Finally, the last way by anyone who
    really wants to lose unwanted weight. The essential purpose why Phen375 fast come to
    be well-liked primarily for the reason that it premiered inside the market with will obviously aid you shed weight
    the correct manner. Are you currently in an urge to burn up finest makesduring the on-line market.

    So this will in the end show that eating style
    which might grow fantastic time many benefits.

  • Write more, thats all I have to say. Literally, it seems as though
    you relied on the video to make your point.

    You clearly know what youre talking about, why throw away your intelligence on just
    posting videos to your blog when you could be giving us something informative
    to read?

Leave a Reply