Use a transaction for deletion.