Database transactions for PUT and POST on transactions