Using mysql transactions

atomicity