databasesWhy a database transaction groups several changes
A database transaction can make a group of changes succeed together or leave none of them applied. When moving a booking between rooms, deleting the old assignment without creating the new one would leave incomplete data. Atomic transactions prevent that particular partial result within the transaction's scope.