delete database functionality