This project, called dbrb, implements a client-server database independent interface.
Its architecture is based on a server program that interfaces to
one or more RDBMS and clients that interact with the server using a simple
protocol. The application program (in C, Perl, Php, Java etc.) does not talk
directly to the RDBMS but forwards its queries to the dbrb server
which in turn forwards them to the database engine. The databases supported
are mysql and postgres.
If you want to try it click here.
There are additional interface modules for informix,db2,oracle and msql here.