The Apache mod_websh module handles, among other things, database connections in a rather sophisticated way.
[Reference to other Web-Tcl systems.]