C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




transaction


Posted Date: 28 Aug 2008      Total Responses: 8

Posted By: narendra       Member Level: Silver     Points: 1


hi friends plz help me

what is meant by a transaction




Responses

Author: Reddy    28 Aug 2008Member Level: SilverRating:     Points: 4
A database transaction is a unit of work performed against a database

management system or similar system that is treated in a coherent and reliable way independent of other transactions. A database transaction, by definition, must be atomic, consistent, isolated and durable.


Author: D.Jeya kumar(JK)    29 Aug 2008Member Level: DiamondRating:     Points: 5
Hi,


Transaction is a process of executing a set of Database
Queries or statement in which we can check the all the the
statement are executed properly otherwise revoke all the values.

For Example in money transfer the amount should be debited from your account and it should be credited to another account is a Transaction.

Check the below site to know about the ACID properties which is essential for every transaction

http://dotnetspider.com/resources/20347-ACID-Properties.aspx

Regards
JK


Author: Sabu C Alex    29 Aug 2008Member Level: GoldRating:     Points: 6
Hai narendra

see this definition

Transaction is a group of sql queries performed as a single logical unit of work. Transaction begins with a specific task and ends when all the tasks in the group successfully complete. If any of the tasks fails, the transaction fails.

The COMMIT Statement terminates the current transaction and makes all changes under the transaction persistent. That is all changes are recorded together in the database.
The ROLLBACK Statement terminates the current transaction and reversing all changes made under the transaction. That is if anything goes wrong with any of the grouped statements, all changes need to be aborted. The process of reversing changes is called rollback in SQL Server terminology.



Author: chandramohan    29 Aug 2008Member Level: GoldRating:     Points: 6
CREATE PROCEDURE spAddBookmark
@UserID AS INT,
@Comment AS VARCHAR (100) = NULL,
@GroupID AS INT = NULL,
@ID AS INT OUTPUT
AS

DECLARE @Bookmarks INT
DECLARE @err INT
Transaction is a group of sql queries performed as a single logical unit of work. Transaction begins with a specific task and ends when all the tasks in the group successfully complete. If any of the tasks fails, the transaction fails.


SET NOCOUNT ON
SET ANSI_WARNINGS OFF

BEGIN TRANSACTION

INSERT INTO Bookmark (UserID, Comment) VALUES (@UserID, @Comment)

SET @err = @@ERROR
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN @err
END
ELSE
BEGIN
SELECT @ID = @@IDENTITY
END

--if bookmark must be shared with members of the same group (this means @GroupID is not NULL)
IF @GroupID IS NOT NULL
BEGIN
INSERT INTO BookmarkSharing (BookmarkID, GroupID) VALUES (@ID, @GroupID)
SET @err = @@ERROR
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN @err
END
END
COMMIT TRANSACTION

SET NOCOUNT OFF
SET ANSI_WARNINGS ON
GO




Author: Legend     29 Aug 2008Member Level: SilverRating:     Points: 6
What transaction you are asking man?(First ask the question clearly)

if you are asking in general , here is definition

General Meaning of Transaction

A transaction is a peace of business, you enter into a deal with someone like buying or selling something.

I bought a new car .
I sold my Avenue Park villa yesterday.
I am always very careful
while having any monetary transactions with Mr. Smith.
Mr. Harrison reckons that half of his business transactions are routed through computers.


if you are asking in database , here is definition


Maintaining the integrity of databases is one of the promises of database management systems. This includes assuring that integrity constraints are invariants of database transactions. This is very difficult to accomplish efficiently in the presence of complex constraints and large amounts of data. One way to minimize the amount of processing required to maintain database integrity over transaction processing is to prove at compile-time that transactions cannot, if run atomically, disobey integrity constraints. We report on a system that performs such verification for a robust set of constraint and transaction classes. The system accepts database schemas written in a more or less traditional style and accepts programs in a high-level programming language. Automatic verification fast enough to be effective on current workstation hardware is performed.



Author: UltimateRengan    29 Aug 2008Member Level: DiamondRating:     Points: 6
hi,
There are two types of transaction in sql
* Rollback
* Commit

commit
The commit statement terminate the current transaction and makes all changes under the transaction persistent. It commits the changes to the database.

General format of Commit

commit
WORK is an optional keyword that does not change the semantics of COMMIT.
ROLLBACK Statement
The ROLLBACK Statement terminates the current transaction and rescinds all changes made under the transaction. It rolls back the changes to the database. The ROLLBACK statement has the following general format:
ROLLBACK [WORK]
WORK is an optional keyword that does not change the semantics of ROLLBACK.



Author: http://venkattechnicalblog.blogspot.com/    31 Aug 2008Member Level: DiamondRating:     Points: 2

Check this URL,

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx

Regards,
Venkatesan Prabu .J


Author: Bunty    16 Sep 2008Member Level: DiamondRating:     Points: 6
Hi,

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.

Regards
S.S.Bajoria



Post Reply
You must Sign In to post a response.
Next : constraint
Previous : SQL 2005 Features
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

UK Conference calling Company

Contact Us    Privacy Policy    Terms Of Use