Transactions and low-level SQL