Added support for selecting a database