Elephant
[unmaintained] A portable object database based on Sleepycat (Berkeley DB) or relational databases.

As of Dec. 5, 2005, Elephant has been tested with BerkeleyDB, SQLite3, and Postgres, and allows seamless migration of data between those repositories. For a while it did not work with Unicode enabled SBCL versions, but that has been fixed.


This comparison by an Elephant developer contrasts it with today's early versions of Rucksack.

Things to keep in mind

If you want to modify the value in a slot which doesn't hold a persistent object, just set the whole slot. Because otherwise the updated slot won't be stored in the DB. Here's an example:

;; Wrong -- the DB won't update (setf (first (slot1 my-persistent-object)) 'foo) ;; Ok (setf (slot1 my-persistent-object) (cons 'foo (rest (slot1 my-persistent-object))))

Of all supported backends, BDB appears to be the primary and recommended one. Elephant may be difficult to run with Berkley DB backend on modern systems. It is not present in Quicklisp, probably due to external dependencies. It worked on 64-bit SBCL 1.4.5 / Linux 4.9 with (:berkeley-db-version . "4.7") (and not 4.8) and ASDF 3.1.5.

FAQ and the source code corresponding to the most recent (as of 2018-03-11) recommended version are somewhat non-trivial to locate. Here goes the FAQ. Concerning the source code, Darcs FAQ recommends the following to fetch repository if you don't have darcs software: wget -r -nH -np -R "index.html*" http://www.common-lisp.net/project/elephant. This will probably fetch more than you need but it works.

Homepage: at common-lisp.net.

Fork with most recent patches: GitHub

License: LLGPL


ObjectStore