Matthew T. O'Connor <[email protected]> said: > Aaron Stone wrote: >> Dan Weber <[EMAIL PROTECTED]> said: >>>Solution B: >>> I have been following libdbi very closely. libdbi is a database >>>abstraction layer in C. Its not bulky like odbc, and its quite like the >>>perl DBI. Basically a move to a single driver libdbi would make sense >>>because you wouldn't have to rebuild to switch drivers. >> >> Because libdbi is LGPL and fairly small, it would be entirely reasonable >> to simply put a version libdbi into the DBMail tree. That way, we don't >> have to bother people with dependencies unless they already have a libdbi >> and modules installation that we can hook into. > > I have never used libdbi, but... We should not be dependent on a > database middle layer. Every database is different and maximum > performance is only gained by writing your SQL specifically for that > database.
The first iteration of the database layers were complete implementations of all queries and query processing together with the database logic, one for MySQL and one for PostgreSQL. It was very hard to maintain. The second iteration, which is what we're on right now, has split out the lowest level interactions and made only those into MySQL-specific and PostgreSQL-specific (and Oracle-specific taking shape on a branch), while the queries and database logic are common to all of them. Because we're at that level of abstraction already, it's not a big leap to add a more formal abstaction library, especially one that's fairly small and easily distributed within our own tarball. Aaron --
