Added support for different DBs