Before removing a database, has to be sure that the variable associated with the database is out of scope