

Oracle embraces SQLite; wraps it around BerkeleyDB as SQL API - gojomo
http://www.oracle.com/technology/products/berkeley-db/sql.html

======
elblanco
This post just generated a tremendous amount of discussion in my company. Not
just for the SQLite wrapper, but also about the Berkeley XML DB. Anyone have
experience using Berkeley for medium-to-large scale data stores (1-100GB?)?
How's the concurrency? What's the licensing model? Is there a way we can use
this without having to give away our source?

~~~
gojomo
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
'distribution'. But also, if you are selling software licenses their bundling
rates might not be bad compared to your unit price. Of course, do your own
license analysis before business use.

~~~
psaccounts
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)?

~~~
gojomo
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>](http://www.opensource.org/docs/osd>);

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

------
jrockway
Excellent. Now I can say, "I'm using Oracle" and still get some work done too.

~~~
zaphar
that phrasing just sounds wrong to me.

------
wmf
Is it faster? More reliable? A way to trick people into paying for SQLite?

~~~
gojomo
The claims in the announcement email I received were performance-related:

 _\- SQL Performance

\-- 10s of thousands of INSERTS/UPDATES/DELETES per-second

\-- 100s of thousands of SELECTs per-second

\-- Approximately as fast as SQLite for reads (within 10%)

\-- About 3X faster than SQLite for updates/writes

\-- Has fine grained locking which leads to better read/write concurrency

\-- 6-8x more transactions/second compared to SQLite when using multiple
threads_

------
ricmo
I'm not sure I get the point of this. Two of SQLites strong points (among many
others) are: (a) Short dependency list (b) Platform independent filesystem
storage

..doesn't this negate both of those for what seems like little gain?

~~~
gojomo
BerkeleyDB doesn't have many dependencies, uses only plain files as storage,
and is itself highly-portable open source (with a quasi-copyleft condition).

So you don't give up much to get the claimed benefits of this combination --
only the ability to use public-domain SQLite in proprietary distributed
software.

~~~
hackermom
SQLite outperforms it by far. That could also weigh in a little :)

~~~
neilc
Do you have any benchmarks to support that claim?

~~~
dlsspy
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.

~~~
gojomo
What does the 'auditable' qualifier (which seems to make the difference
between SQLite beating BDB, or BDB beating SQLite) mean?

~~~
dlsspy
auditable means every revision of every change was saved in a fashion that
allows you to go back in time and what-not.

Specifically, it means this:
[http://github.com/dustin/kvtest/blob/master/sqlite-
base.cc#L...](http://github.com/dustin/kvtest/blob/master/sqlite-base.cc#L164)

------
megamark16
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?

~~~
jamie
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.

------
hackermom
I have nothing but good things to say about SQLite. Small. No dependencies.
Lightning fast. Public domain. I use it exclusively for all things databases
where the customer for whatever reason does not demand one of the other
players. I'm glad to see a major actor in the DB industry picking up on it.

~~~
dlsspy
Most importantly: The best tested software out there:
<http://www.sqlite.org/testing.html>

"As of version 3.6.23 (all statistics in the report are against that release
of SQLite), the SQLite library consists of approximately 67.2 KSLOC of C code.
(KSLOC means thousands of "Source Lines Of Code" or, in other words, lines of
code excluding blank lines and comments.) By comparison, the project has 679
times as much test code and test scripts - 45678.3 KSLOC."

------
hank777
anybody have any idea how this might compare to mysql inno or myisam?

~~~
jamie
It's roughly comparable to innodb in that it's ACID compliant.

MyISAM doesn't support transactions or transaction logging, so it's not as
durable as INNODB or BDB.

