What is a transaction and what are ACID properties?

Answers were Sorted based on User's Feedback



What is a transaction and what are ACID properties?..

Answer / pravesh

A transaction is a sequence of sql Operations(commands),
work as single atomic unit of work. To be qualify
as "Transaction" , this sequence of operations must satisfy
4 properties , which is knwon as ACID test.

A(Atomicity):-The sequence of operations must be atomic,
either all or no operations are performed.

C(Consistency):- When completed, the sequence of operations
must leave data in consistent mode. All the defined
relations/constraints must me Maintained.

I(Isolation): A Transaction must be isolated from all other
transactions. A transaction sees the data defore the
operations are performed , or after all the operations has
performed, it can't see the data in between.

D(Durability): All oprtaions must be permanently placed on
the system. Even in the event of system failure , all the
operations must be exhibit.

Is This Answer Correct ?    309 Yes 26 No

What is a transaction and what are ACID properties?..

Answer / swapna

A transaction is a logical unit of work in which, all the
steps must be performed or none. ACID stands for Atomicity,
Consistency, Isolation, Durability. These are the
properties of a transaction

Is This Answer Correct ?    188 Yes 18 No

What is a transaction and what are ACID properties?..

Answer / archana

A transaction is an atomic unit of work that must be
completed in its entirety.The transaction succeeds if it
committed and fails if it is aborted.Transactions have four
essential properties:atomicity,consistency,isolation, and
durability(known as the ACID properties).

Atomicity:The work cannot be broken into smaller
parts.Although a transaction might contain many SQL
statements,it must be run as all-or-nothing
proposition,which means that,if a transaction is only
partially complete when an error occurs,the work revertss
to its state prior to the start of the transaction.

Consistency:A transaction must operate on a consistent view
of the data and also leave the data in a consistency
state.Any work in progress must not be visible to other
transactions until the transaction has been committed.

Isolation:A transaction should appear to be running by
itself,the effects of other ongoing transactions must be
invisible to this transaction,and the effects of this
transaction must be invisible to other ongoing transaction.

Durability:When the transaction is committed,it must be
persisted so it is not lost in the event of a power
failure.Only committed transaction are recovered during
power-up and crash recovery;uncommitted work is roll back.

Is This Answer Correct ?    72 Yes 13 No

What is a transaction and what are ACID properties?..

Answer / piyush

transaction is a set of operation or activities which are
executed in a logical unit of work which is know as transaction.

ACID
A-Atomicity
C-Consistency
I-Isolation
D-Durability

Is This Answer Correct ?    28 Yes 8 No

What is a transaction and what are ACID properties?..

Answer / kumar

The ACID model is one of the oldest and most important
concepts of database theory. It sets forward four goals
that every database management system must strive to
achieve: atomicity, consistency, isolation and durability.
No database that fails to meet any of these four goals can
be considered reliable.

•Atomicity states that database modifications must follow
an “all or nothing” rule. Each transaction is said to
be “atomic.” If one part of the transaction fails, the
entire transaction fails. It is critical that the database
management system maintain the atomic nature of
transactions in spite of any DBMS, operating system or
hardware failure.

•Consistency states that only valid data will be written to
the database. If, for some reason, a transaction is
executed that violates the database’s consistency rules,
the entire transaction will be rolled back and the database
will be restored to a state consistent with those rules. On
the other hand, if a transaction successfully executes, it
will take the database from one state that is consistent
with the rules to another state that is also consistent
with the rules.

•Isolation requires that multiple transactions occurring at
the same time not impact each other’s execution.

.Durability ensures that any transaction committed to the
database will not be lost. Durability is ensured through
the use of database backups and transaction logs that
facilitate the restoration of committed transactions in
spite of any subsequent software or hardware failures

Is This Answer Correct ?    20 Yes 7 No

What is a transaction and what are ACID properties?..

Answer / rahul mankumare

Transaction is a unit of program execution that access &
possibly update various data items.
Usually a transaction is initiated lay a user program
written in a high level data manipulation language or
programming language (for eg. sql c# and java) where it is
deliminated by statement or function call s of the from
begin transaction and end transaction
ACID Properties
Atomicity:The work cannot be broken into smaller
parts.Although a transaction might contain many SQL
statements,it must be run as all-or-nothing
proposition,which means that,if a transaction is only
partially complete when an error occurs,the work revertss
to its state prior to the start of the transaction.

Consistency:A transaction must operate on a consistent view
of the data and also leave the data in a consistency
state.Any work in progress must not be visible to other
transactions until the transaction has been committed.

Isolation:A transaction should appear to be running by
itself,the effects of other ongoing transactions must be
invisible to this transaction,and the effects of this
transaction must be invisible to other ongoing transaction.

Durability:When the transaction is committed,it must be
persisted so it is not lost in the event of a power
failure.Only committed transaction are recovered during
power-up and crash recovery;uncommitted work is roll back.

Is This Answer Correct ?    12 Yes 6 No

What is a transaction and what are ACID properties?..

Answer / hloni

A transaction is a sequence of database operations that
access the database. It must be a logical unit of work,
meaning that no portion of the transaction can exist on its
own. Either all parts are executed or the transaction is
aborted.

Transaction has five main properties called ACIDS:

1. Atomicity -- all parts of the transaction are executed
or else the transaction is aborted.

2. Consistency -- indicates the permanence of the
database's consistent state. When a transaction is
completed the database reaches a consistence state.

3. Isolation -- means that the data used during the
exercution of a transaction cannot be used by the a second
transaction until the first transaction is complete.

4. Durability -- ensures that once transaction changes are
commited, they cannot be lost even in the event of system
failure.

5. Serializability -- ensures that concurrent execution of
several transaction yields consistent results. This
property is important in a multi-user and distributed
datbases, where multiple transaction are likely to be
executed concurrently.

Is This Answer Correct ?    14 Yes 10 No

What is a transaction and what are ACID properties?..

Answer / kumar

a transaction is a set of operations perfomed on a database.
After a transaction is done it is commited.

Is This Answer Correct ?    10 Yes 8 No

What is a transaction and what are ACID properties?..

Answer / sumit jha

A transaction can be defined as a group of tasks. A single task is the minimum processing unit which cannot be divided further.
Let’s take an example of a simple transaction. Suppose a bank employee transfers Rs 500 from A's account to B's account. This very simple and small transaction involves several low-level tasks.
A’s Account
Open_Account(A)
Old_Balance = A.balance
New_Balance = Old_Balance - 500
A.balance = New_Balance
Close_Account(A)
B’s Account
Open_Account(B)
Old_Balance = B.balance
New_Balance = Old_Balance + 500
B.balance = New_Balance
Close_Account(B)
ACID Properties
A transaction is a very small unit of a program and it may contain several lowlevel tasks. A transaction in a database system must maintain Atomicity, Consistency, Isolation, and Durability − commonly known as ACID properties − in order to ensure accuracy, completeness, and data integrity.
• Atomicity − This property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none. There must be no state in a database where a transaction is left partially completed. States should be defined either before the execution of the transaction or after the execution/abortion/failure of the transaction.
• Consistency − The database must remain in a consistent state after any transaction. No transaction should have any adverse effect on the data residing in the database. If the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well.
• Durability − The database should be durable enough to hold all its latest updates even if the system fails or restarts. If a transaction updates a chunk of data in a database and commits, then the database will hold the modified data. If a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action.
• Isolation − In a database system where more than one transaction are being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.

Is This Answer Correct ?    1 Yes 0 No

What is a transaction and what are ACID properties?..

Answer / ajith

In computer science, ACID (atomicity, consistency,
isolation, durability) is a set of properties that
guarantee database transactions are processed reliably. In
the context of databases, a single logical operation on the
data is called a transaction. For example, a transfer of
funds from one bank account to another, even though that
might involve multiple changes (such as debiting one
account and crediting another), is a single transaction.

Jim Gray defined these properties of a reliable transaction
system in the late 1970s and developed technologies to
automatically achieve them.[1] In 1983, Andreas Reuter and
Theo Haerder coined the acronym ACID to describe them.[2]

Contents [hide]
1 Characteristics
1.1 Atomicity
1.2 Consistency
1.3 Isolation
1.4 Durability
2 Examples
2.1 Atomicity failure
2.2 Consistency failure
2.3 Isolation failure
2.4 Durability failure
3 Implementation
3.1 Locking vs multiversioning
3.2 Distributed transactions

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL Server Interview Questions

to explain sql server 2000 architecture & authentication

1 Answers   HCL,


How many types of schemas are there?

0 Answers  


Describe in brief sql server monitoring ways.

0 Answers  


What are the types of backup and tell me the difference between full and differential backup?

4 Answers   CTS, TCS,


What is a subquery in a select query statement in ms sql server?

0 Answers  






How to use wildcard characters in like operations in ms sql server?

0 Answers  


What are .mdf files?

0 Answers  


What are the properties of sub-query?

0 Answers  


Explain primary key?

0 Answers  


Explain sub-query?

0 Answers  


Can you explain what is the use of custom fields in report?

0 Answers  


What are trace flags and mention a few common trace flags used with sql server?

0 Answers  


Categories