TclDBI or a common database interface re-hashed

Is it too late in the game for a real standard Tcl database interface?

No, I don't think so but it's been a long time in the coming.

I have been using TCL now for over 10 years and I do A LOT of Sql coding, connecting to several RDMS. Knowing that many, many people have tried several attempts on a "one" interface to many dB types, myself included.

The problem is... In the community this has been a well argued topic, but with no real fruit growing from any. I know I myself have written at least four DBI like packages, never really liking any. When I was looking for input and guidance on writing a standard type DBI, I remember getting several nasty grams and a lot of flak from some people. As a community, we have failed this subject in school.

To me, for a DBI for Tcl to be widely accepted and useful, it should be planned from the very beginning as a tcllib module. In my opinion, a blind module for tcllib would be the way to go. It would be the "Standard" calling interface that the REAL db interface code would use. This would be akin to JDBC and .Net Data providers; were the DBI provides a common interface, and the under-lying driver module does the real work. A note here: I am not saying make it like JDBC or the .Net Sql interface. Just make the tcllib module a standard calling/method/class interface for the drivers to be written to use and respond to.

As of now I have an snit interface I use to talk to my db's. It works fine for me in my work and I can switch between platforms & RDMS's without too much hassle. I would love to see a good common tcl API written though and could offer up help in writing a driver or two for the new interface. I think for a common TCL db interface to make it mainstream, the standard tcllib approach would be the best. My inflationary 2cents worth.

LV Have you taken a look at TDBC? It seems, to me, that the interface that Kevin has outlines is an interface similar to what you describe. Input to Kevin with regards to the pros and cons of the current TDBC interface would, I suspect, be appreciated, and as the community begins writing drivers for it, there is hope that it will become a more commonly used interface.

JSB I have, and it looks promising but it's not in the tcllib and has to be built. It's still not perl or python like, in that it's just there or can be easily. I think for something to get prime use, it needs to "be there" in the standard installation or close by like tcllib. I do know all drivers may not be there and thats acceptable. Let me add.... I am not saying that TDBC would not be the code for the job.