All matching order records in the Orders table are automatically deleted. Then, for each deleted order record in the Orders table, all matching detail records in the Order Detail table are also deleted. This would remove pending as well as fulfilled orders, however, so cascading delete should be used with caution. The transaction concept is central to the operation of modern database management systems. A short review is provided here as background.
Transactions are an error handling mechanism and a program structuring mechanism.
As an error handling mechanism, they allow you to do an arbitrary amount of work in a system and then change your mind. Please put everything back the way it was before I started. Please make all my changes official. When a transaction is executing, we say it is active or in-flight . When a transaction is completed normally, we say that it is committed .