ODB - an Object Database Front-end for Python
ODB (a.k.a. "spugdb" due to a name clash on code.google.com) is a
pure-python key-value style database system. It supports nested transactions,
object schemas, cursors and a simple, X-Path like query language.
ODB is a good fit for situations where you have relatively small storage
requirements, low throughput and need a lightweight pure-python database. In
simple benchmarking scenarios on modern CPUs and local filesystems, it can
handle on the order of 1000 general operations per second, or 300 insertions per
seecond. Tables larger than 100 megabytes have not been tested.
ODB started out as a front-end to BDB (Berkeley DB). After the author
encountered problems with BDB, two additional pure-python storage engines were
written. At this time, the primary interface has been rewritten and the older
BDB-style interface (while still available) is deprecated.
At this point, ODB is fairly mature. It is being used in a number of
projects (several personal projects by the author and two systems at Google).
Links
Downloads
- odb 0.5
2010-01-09
-
-
Added a new interface for the system. The BDB, Mem and Full interfaces are
now deprecated.
-
Added the "model" system, which allows you to define object schemas mapping
python objects to a set of database tables and indeces.
-
Abstracted out the low-level storage system (allowing storage to
non-filesystems and backups after checkpointing)
- odb 0.4 2008-11-04
-
- odb 0.3 2008-05-03
-
-
Switched license to LGPLv3.
-
Re-wrote the b-tree code from the ground up.
-
Implemented "blists" - btree implementation of a random-access sequence.
-
Documentation improvements.
- odb 0.2 2008-01-19
-
-
Fixed several cases where a b-tree wasn't demand loading a node before
performing some action on it.
-
Differentiated between a key of None and an empty key (""), allowing empty
keys to be used.
-
Fixed the use of the key's reference count (it wasn't getting incremented
when the key was reused)
-
When replacing a node, the original node wasn't getting marked deleted.
Fixed this.
-
The full back-end wasn't building the dictionary of all of the tables during
initialization, causing exceptions while processing the transaction log if the
last log didn't also create the table. Fixed this.
-
Added numerous test cases to exercise all of these fixes, including an
"update" action in the test of 1000 random actions.
- odb 0.1 2008-01-13
-
Initial release.