---+!! <nop>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.

<!--

   PLEASE DO NOT EDIT THIS TOPIC

   It is automatically generated from the subversion repository, and any
   changes you make will simply be overwritten the next time a release is
   generated.

   Instead, you could check your fix in, raise a bug in the Bugs web, or
   mail the author.
-->

%TOC%

This Contrib installs a derivative of the
[[http://us5.samba.org/samba/][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:
<verbatim>
  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" });
</verbatim>
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:
<verbatim>
cd lib/tdb
./configure
</verbatim>
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:
<verbatim>
./configure --prefix=/home/twiki/libs
</verbatim>
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: | 11559 (12 Dec 2008) build 02:26:52 12 December 2008 |
| Change History: | |
|  | Split out of Web<nop>DAVPlugin |
|  Other Dependencies: | <table border="1"><tr><th>Name</th><th>Version</th><th>Description</th></tr><tr><td align="left">TDB_File</td><td align="left">&gt;=0.90</td><td align="left">Trivial database perl interface, available from [[http://cpan.uwinnipeg.ca/module/TDB_File][CPAN]].</td></tr></table> |
|  Perl Version: | 5.005 |
|  License: | GPL, as per licensing requirements of TDB |
|  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
|  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |

---++ Acknowledgements
   * Thanks to the Samba and TDB projects for their excellent database!
