Version 42 of Interacting with databases

Updated 2004-02-10 11:42:03

Purpose: Serve as a collection point for work relating to interfacing between Tcl and databases.


There are a variety of issues relating to Tcl and databases. The first and most thorny, in my (LV) opinion is the selection of the right database. That is because that currently there is no generic interface to databases available in Tcl, so one has to either write multiple versions of an application, to support whatever databases the user community is going to be using, or you select one to support and force everyone to use that one, frequently by including the database code in the application itself.

Both of these are uncomfortable decisions on the part of programmers who wish widest acceptance of their application.

To find the various extensions mentioned below, visit http://www.purl.org/NET/Tcl-FAQ/part5.html .

Tom Poindexter has written interfaces to Sybase and Oracle. Several people have written interfaces to Berkeley DB, mini SQL (mSQL) and PostgreSQL. Jean-Claude Wippler has written an interface to Metakit, which is a small database designed around the idea of variable persistence. Metakit has a wonderful Tcl binding that makes all the power of Metakit available in a natural and intuitive way. Jacob Levy has written the e4graph extension for integrating graph structured data storage into Metakit. Interfaces to lesser known databases such as OBST, Coral, MOREplus, Qddb, etc. "Regular Expressions" ran a column [L1 ] on "Tcl and Database Managers -- A Survey" in August 2001.

A mailing list to discuss database APIs is available at mailto:[email protected] .

A page here is devoted to generic Database Interfaces.


Several of the extensions mentioned above live on SourceForge now:

Please add any extension I forgot, AK. Thanks.


Don't forget that AOLserver has its own drivers for many databases (Oracle, PostgreSQL, Sybase, Solid, etc.), all accessible from the same ns_db Tcl API. And the AOL maintainers have started refactoring the C code to make some of this stuff shared libraries, and thus potentially very useful in non-AOLserver environments as well...

  * http://mini.net/tcl/2078
  * http://aolserver.com/

   Here are a variety of other Tcl database bindings
        ftp://ftp.uu.net/pub/database/obst/
        ftp://src.doc.ic.ac.uk/computing/databases/OBST/
        http://www.ucolick.org/%7Ede/tcl_syb/wisql.html
        http://field.medicine.adelaide.edu.au/%7Ecolin/libtclpq/
        http://malik.srce.hr/CARNet/tools/TCLSNM/

See also Database Interface , A simple database , BOOK Database Backed Web Sites, and the Developer Exchanged information site, http://www.purl.org/tcl/home/resource/software/extensions/database/ . Arts and crafts of Tcl-Tk programming Discussions on making data file access simpler


[ Category Mailing List

Category Database ]