Added support for database prefixes