A transaction is a logical unit of work. Each transaction is a sequence of logically related commands that accomplish one task and transform the database from one consistent state into another.
Transactions are atomic. In other words, Sybase IQ executes all the statements within a transaction as a unit. At the end of each transaction, changes can be committed to make them permanent. If for any reason any of the commands in the transaction do not process properly, then some or all of the intermediate changes can be undone, or rolled back. The user application controls the conditions under which changes are committed or rolled back.
Transactions break the work of each user into small blocks. The completion of each block marks a point at which the information is self-consistent. Transaction processing is fundamental to ensuring that a database contains correct information.
Sybase IQ processes transactions quite differently from the way SQL Anywhere does when it operates without IQ. This chapter describes how Sybase IQ handles transactions. If you are working in an Anywhere-only database, see the SQL Anywhere Server – SQL Usage for information on transactions and locking.