BDB

Berkeley DB CFFI bindings

latest Update: Thursday 6 June, 2006 21:30(MET)

Introduction

BDB is a small (well it was supposed to be a small...) package offering CFFI-Bindings to Berkeley DB. The package is supposed to be as lispy , but as near to the C library as possible.
You can find more informations about Berkeley db on http://www.sleepycat.com. Since the package is supposed to be as near as possible to the C library, you should read the "Getting starting..." guides, using the "bdb-playgound" package, to get a feeling on how to use Berkeley DB and/or bdb.

State

Lisp Platforms: if you test with another lisp implementation or system please tell me if it runs or not (fixing the problems will be fine too). These are the systems i successfully (didn't tried others now) tested bdb (on a x86 Linux system with libdb4.3)

- sbcl (successfully tested with sbcl 0.9.10 and newer on x86)
- cmucl (successfully tested with release-19a)
- clisp (successfully tested with version 2.38)
Berkeley DB Version: 4.3
Features
  • Database Environments
  • Databases :)
  • Secondary Databases
  • Cursors
  • Transaction
  • Sequences
  • some kind of abstraction, thus user don't need to deal with buffers and may provide methods for serialization and deserialization
Not completed/Missing Features:

In the moment the library is in a state i can work without any doubts, but if there are some features you will need, tell me or better send me a patch.

  • DB Memory Pools
  • Mutexes (do we realy need mutex support provided by BerkeleyDB?)
  • Replication
  • Locking (not all functions available)
  • Logging (not all functions available)
  • some functions being not implemented yet
Package version: I don't use any versioning (at the moment), so get used to the darcs repo. But at the moment consider this an alpha version...
License LLGPL

Packages

Sure, the package was supposed too be small, but unfortunatelly it grew and grew, thus it consists/needs several packages:

PackageDescriptionDependenciesDocumentation ChangeLog
mycl-util My private utility package, which i use/develop in, since I'm lerning CL (I'm just very new to CL...) None documentation
cffi-util Was once part of bdb package, but outsourced as new package.
This package brings you a "flag-system" for handling constant definitions in seperated systems, an defcfun extension macro to "easily" translate c idiosncratics into lisp ones, cbuffer and pool plus cbuffer input/output streams.
CFFI
mycl-util
trivial-gray-streams
flexi-streams
documentation
bdb These are the CFFI bindings to Berkley DB CFFI
mycl-util
cffi-util
documentation
bdb-playground If you want to play/test the library, bdb-playground is a nice starting point, since it uses cl-store for writing and reading the data into/from the database and you can immediately start unsing the library. bdb
cl-store
documentation

Download/darcs

projectdarcs repo
mycl-util darcs get http://common-lisp.net/project/bdb/darcs/mycl-util
cffi-util darcs get http://common-lisp.net/project/bdb/darcs/cffi-util
bdb darcs get http://common-lisp.net/project/bdb/darcs/bdb
bdb-playground darcs get http://common-lisp.net/project/bdb/darcs/bdb-playground

Installation

bdb package:
The bdb package comes with a wrapper library for libdb, which must be compiled and made available. You can find more infos on how to install in the README file.

All packages:
Just make all asdf files available and load via asdf.

Example Usage

  1. Simple db Example
  2. Secondary Databases
  3. Transactions
  4. DB-Ext Test
  5. Sequences

Mailing Lists

Valid XHTML 1.0 Strict