What is a transaction? In the context of databases and data storage systems, a transaction is any operation that is treated as a single unit of work, which either completes fully or does not complete at all, and leaves the storage system in a consistent state.
The Common Closure Principle
The Common Closure principle tells us to consider all the reasons a package might need to change, and to split it accordingly.