Added better support for database scenario's.