Date: 2001-07-06 13:12:47
Imagine you want to go to the restaurant and then go to the theater.
But you don't want to go only to the theater or only to the restaurant. You want to do both or nothing.
What are you going to do ?
Pick up your phone and call the restaurant, first. You will check that you can reserve one table.
Call the theater, then. You will check that you can reserve the places.
If both answers are yes, you will decide to go. You will have to call them to confirm the reservations. Otherwise you forget it.
Doing this with databases (transactions) is called 2-phase commit.
Read More about 2-Phase commit here : BEA Tuxedo 2-Phase Commit