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 all 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. In DBISQL the AUTO_COMMIT option can be used to control commits and rollbacks automatically.
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 Adaptive Server 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 Adaptive Server Anywhere User's Guide for information on transactions and locking.