Added option to specify database.