Added support for multiple database backends