The according to libdbi (http://libdbi.sourceforge.net/) project:libdbi implements a database-independent abstraction layer in C,similar to the DBI/DBD layer in Perl. Writing one generic set of code,programmers can leverage the power of multiple databases and multiplesimultaneous database connections by using this framework.

Here is how the Firebird libdbi driver is implemented and you can see how the layer is made over the standardfirebird api