4 Defining Transactions and Applications