The idea of ACID transactions are a basic feature of SQL’s
individual Data Manipulation Language (DML) commands, like the
statements. Transactions across two or more tables are a natural
extension of ACID compliance features provided by DML commands.
However, they require a structured programming approach, like a
store procedure or like API implemented in an imperative
Surprisingly, transaction management wasn’t covered well in Alan Beaulieu’s Learning SQL because he only provided pseudo code logic. While I thought troubleshoot some broken MySQL SQL/PSM logic would be a good learning experience for students, it wasn’t. So, I wrote this sample code to show how to achieve an all or nothing transaction across four tables.
The code for this example on transaction management lets you perform the important tasks necessary to effect transaction …[Read more]