The design for the Big Transaction..
START TRANSACTION;
/*
INERT for login detail
*/
/*
INSERT for personal information
*/
/*
INSERT for user's transaction account
*/
COMMIT;
and the design for the Small Transactions..
START TRANSACTION;
/*
INSERT for login detail
*/
COMMIT;
START TRANSACTION;
/*
INSERT for personal information
*/
COMMIT;
START TRANSACTION;
/*
INSERT for user's transaction account
*/
COMMIT;
Current results
I have tried both in our application, and by using the 'Big' transaction we experienced deadlock in a certain table.
By using the small transactions, there's a chance that one or two of the three may not run and cause discrepancy.
My experience in handling such cases is not sufficient to provide the best solution in this kind of scenario. What kind of solution can be made here?