Francais | English | Espanõl

Database transaction

From Wikipedia, the free encyclopedia

Jump to: navigation, search

A database transaction is a unit of interaction with a database management system or similar system that is treated in a coherent and reliable way independent of other transactions that must be either entirely completed or aborted. Ideally, a database system will guarantee all of the ACID properties for each transaction. In practice, these properties are often relaxed somewhat to provide better performance.

In some systems, transactions are also called LUWs for Logical Units of Work.

Contents

[edit] Purpose of transaction

In database products the ability to handle transactions allows the user to ensure that integrity of a database is maintained.

A single transaction might require several queries, each reading and/or writing information in the database. When this happens it is usually important to be sure that the database is not left with only some of the queries carried out. For example, when doing a money transfer, if the money was debited from one account, it is important that it also be credited to the depositing account. Also, transactions should not interfere with each other. For more information about desirable transaction properties, see ACID.

A simple transaction is usually issued to the database system in a language like SQL in this form:

  1. Begin the transaction
  2. Execute several queries (although any updates to the database aren't actually visible to the outside world yet)
  3. Commit the transaction (updates become visible if the transaction is successful)

If one of the queries fails the database system may rollback either the entire transaction or just the failed query. This behaviour is dependent on the DBMS in use and how it is set up. The transaction can also be rolled back manually at any time before the commit.

[edit] Transactional databases

Databases that support transactions are called transactional databases. Most modern relational database management systems fall into this category.

[edit] Transactional filesystems

The Namesys Reiser4 filesystem for Linux [1] and the newest version of the Microsoft NTFS filesystem support transactions [2].

[edit] See also

[edit] External links


Topics in database management systems (DBMS)

view  talk  edit</span>  )

Concepts
Database | Database model | Relational database | Relational model | Relational algebra | Primary key - Foreign key - Surrogate key - Superkey
Database normalization | Referential integrity | Relational DBMS | Distributed DBMS | ACID

Objects
Trigger | View | Table | Cursor | Log | Transaction | Index | Stored procedure | Partition

Topics in SQL
Select | Insert | Update | Merge | Delete | Join | Union | Create | Drop
Comparison of syntax

Implementations of database management systems

Types of implementations
Relational | Flat file | Deductive | Dimensional | Hierarchical | Object oriented | Temporal

Products
Caché | db4o | dBASE | Firebird | Helix database | DB2 | Informix | Ingres | InterBase | Microsoft SQL Server | MySQL | OpenLink Virtuoso | Oracle | PostgreSQL | SQLite | Sybase IQ | Sybase | Teradata | Visual FoxPro | Comparison - relational | Comparison - object-relational

Components
Query language | Query optimizer | Query plan | ODBC | JDBC
Lists
List of object-oriented database management systems
List of relational database management systems

cs:Databázová transakce

da:Databasetransaktion de:Transaktion (Informatik) es:Transacción fr:Transaction (base de données) it:Transazione (database) he:תנועה (מערכות מידע) nl:Transactie (dataopslag) ja:トランザクション pl:Transakcja (informatyka) ru:Транзакция vi:Giao dịch cơ sở dữ liệu

Personal tools