Added code for deleting and updating data to the database