Is it possible to use sql database for BibTeX?
Nelson Beebe gave a talk at TUG 2009 on using SQL databases for bibliographic purposes as a replacement for BibTeX. The program is bibsql and looks very promising, but I haven't used it myself.
You can read more details and examples in his paper in TUGboat 30(2).
One idea would be to use one of the many python APIs for SQL, and pipe that to one of the python modules that output bibtex