refactor 'drop database' operation