TDB

TDB is the tiny database from the Samba project. This contrib bundles it to make it easily installable for use with other TWiki extensions.

This Contrib installs a derivative of the Samba TDB (tiny database). This is a small, lightweight, reasonably fast database coded in C, that also happens to be very useable from Perl. The TDB shipped with this Contrib is a hybrid of tdb-1.0.6 and the tdb used by samba-3.0.21c. This was required because the developers of these packages have not kept them synchronised.

The package also includes all the header files required to use the database from C-code.

To use the database from perl, you should also install the perl interface (TDB_File, available from CPAN).

So what can you do if you have it? Here's a taster:

  my $tdb = TDB_File->open($filename, TDB_CLEAR_IF_FIRST) or die $!;
  $tdb->store(key => 'value') or die $tdb->errorstr;
  $tdb->traverse(sub { print "$_[0] -> $_[1]\n" });
See http://cpan.uwinnipeg.ca/htdocs/TDB_File/TDB_File.html for the full doc.

Note: this package was formerly bundled as part of WebDAVPlugin. If you install this package, WebDAVPlugin will work with it quite happily (and vice-versa).

Installation

The following steps are automated by the install script shipped with this module.

If you are installing as an administrator, make sure you don't already have tdb installed (it would be embarassing to overwrite an existing install used by Samba, for example!)

The distribution includes all you need to build and install it. Starting from your TWiki root directory:

cd lib/tdb
./configure
By default make install will now build the module and install the library in /usr/lib. If you can't write to /usr/lib, you can change the target directory like this:
./configure --prefix=/home/twiki/libs
but you will have to work out how to explain to Apache that it has to look there, if you are using the library with a CGI script.

Settings

    • Set SHORTDESCRIPTION = TDB is the tiny database from the Samba project. This contrib bundles it to make it easily installable for use with other TWiki extensions.

Info

Author: TWiki:Main/CrawfordCurrie http://c-dot.co.uk
Version: %$VERSION% build %$DATE%
Change History:  
  Split out of WebDAVPlugin
Other Dependencies: %$DEPENDENCIES%
Perl Version: 5.005
License: GPL, as per licensing requirements of TDB
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/TdbContrib
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TdbContribDev

Acknowledgements

  • Thanks to the Samba and TDB projects for their excellent database!
Topic revision: r1 - 02 Apr 2008 - 01:17:38 - TWikiGuest
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TdbContrib