Live data from Hacker News

Oracle embraces SQLite; wraps it around BerkeleyDB as SQL API

oracle.com

21–26 of 26 posts

Re: Oracle embraces SQLite; wraps it around BerkeleyDB as SQL API

#21
post #15
post #9

Earlier quoted context omitted.

Do you have any benchmarks to support that claim?

I do. I wrote a tool to help me understand what I could do on various storage tiers running as safely as possible. Here's one of my results from linode: http://skitch.com/dlsspy/nh2qb/kvtest-results-on-linode Here's the code: http://github.com/dustin/kvtest Depending on what you're doing and how safe you want it, you can adjust inputs to select a different winner.

This is an awesome shootout! Be careful with BDB, its default tuning is geared more towards an embedded environment then a modern web-app. That's not to say it can't go fast!

I took a look at your BDB demo and saw that you weren't creating the DBs in an environment, which meant every operation was straight to disk, and also meant that you weren't running with write-ahead logs (which will give you durability). I didn't look too closely to see if the other databases had caching enabled or not (or what their defaults were).

On my macbook air, configuring with caching (and no logging) yielded this from your benchmark:

Air:kvtest jamie$ ./bdb-test Running test ``test test'' PASS Running test ``write test'' Ran 284669 operations in 5s (56933 ops/s) PASS

Of course, page caching makes all the difference :-)

BDB has some great sample code, I'd recommend taking a look at: examples_c/ex_env.c (http://www.fiveanddime.net/berkeley-db/db-4.3.28/examples_c/...)

I really wish BDB had more sensible defaults, I think it unfairly gets a black-eye in performance shootouts.

Re: Oracle embraces SQLite; wraps it around BerkeleyDB as SQL API

#23
post #13

Earlier quoted context omitted.

I don't have experience with the Berkeley XML DB. I have used the BerkeleyDB 'Java Edition' (a different codebase and on-disk format) for multi-GB spill-to-disk queues and maps/sets. The BerkeleyDB license is roughly: free to include in open-source projects, pay if you want to redistribute as part of a closed-source product. So like with the GPL, using strictly inside your company might not be considered 'distributio…

What would be the licensing model if the product is open source, but is NOT free (i.e., customers are charged for an open-source product in which BDB is used)?

You need to do your own analysis, not trusting some random guy on the internet (eg, me). But:

(1) If people need to pay to use, it's not "open source" by the "open source definition" of the OSI: http://www.opensource.org/docs/osd>

(2) Contacting Oracle/BDB will let you know what they think your obligations are.

Re: Oracle embraces SQLite; wraps it around BerkeleyDB as SQL API

#26

So would that mean that you could easily and transparently use this as a backend for something with a sqlite interface, say for example Django?

Yes, but more importantly, this should allow concurrency to the database. You can now have multiple writers to the same underlying database.

Previously, I believe SQLITE would lock the entire database any time you accessed it.

Post reply on HN