Fix database binding when there is no db configuration
Allow db config key to be configured