How does a database transaction work?

Context: How does \Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save::_saveShipment() work?

Part 1: adding objects (models) to a transaction


Part 2: executing the transaction



Details: How does \Magento/Framework/DB/Transaction::_startTransaction() work?


Details: How does \Magento/Framework/DB/Transaction::_commitTransaction() work?

See also: