Register
Sign In
Skip over navigation
Home
Add New Question
Jobs
Products
Database Transaction
Question posted
in
Computer Software
on
06 2010
Rate question difficulty level
0
0 Votes
what is a transaction? what are commit and rollback actions are used for?
Add an answer
Share
|
3 Answers
Gadi Berqowitz
A database transaction comprises a unit of work performed within a database management system (or similar system) against a database, and treated in a coherent and reliable way independent of other transactions. Transactions in a database environment have two main purposes:
1. To provide reliable units of work that allow correct recovery from failures and keep a database consistent even in cases of system failure, when execution stops (completely or partially) and many operations upon a database remain uncompleted, with unclear status.
2. To provide isolation between programs accessing a database concurrently. Without isolation the programs' outcomes are possibly erroneous.
A database transaction, by definition, must be atomic, consistent, isolated and durable.[1] Database practitioners often refer to these properties of database transactions using the acronym ACID.
Transactions provide an "all-or-nothing" proposition, stating that each work-unit performed in a database must either complete in its entirety or have no effect whatsoever. Further, the system must isolate each transaction from other transactions, results must conform to existing constraints in the database, and transactions that complete successfully must get written to durable storage.
A COMMIT statement in SQL ends a transaction
A ROLLBACK is an operation which returns the database to some previous state
06/24/2010
Partha
A database transaction is a logical unit of database operations which are executed as a whole to process user requests for retrieving data or updating the database.
Commit/Rollback - Normally transactions are auto commit/Rollback depending on the successful completion of operations or failure in half way respectively. But you can control it by executing 'Begin Tran' statement followed by the set of SQL Statements/Operations you have and then decide execute 'Commit' to write the change in database or execute 'Rollback' if you don't want the change to be reflected in database.
06/24/2010
Guest
Mostly aLL RDBMS follow the ACID model (Atomicity, consistency, Isolation and durability). Of these 4, Atomicity states "all or none". Means when the user is trying to save records into multiple table under one shot, then in that case either everything is saved to the db or in case of error anything that was stored before the error occured needs to be removed. To handle such scenarios, the SQL transaction comes into picture. The entire saving process is clubbed under one transaction. All the CRUD statements are performed one after the other. In case during the execution of CRUD statements, an error occurs, then the transaction is rolledback (using "ROLLBack Tran"), which will undo all the changes that have been made from the start of the transaction till the error occured. In case the error does not occurs during the execution of the CRUD statements, then all the data is actually physically saved to the db using the Commit statement.
In short,
A Commit statement is issued to save the changes that were made to the db during a transacation
A Rollback statement is issued to undo all the changes (in case of occurence of an error) that were made to the db during a transacation
06/25/2010
Add an answer*
Your name
Email
Enter the code shown above:
please wait..
Company:
TGS
Location:
Israel
Tags:
Database
,
transaction
Occupations:
Software\System Architecture
,
Software\Web Development
add a question
Now hiring!
Information Technology Development Program/Software Engineer
National Security Agency (NSA)
Fort George G Meade, MD
To advance the development of Information Technology, NSA has created the new Information Technology Development Program ... 'Software development life cycle experience (e.g., software design, quality assurance, testing, planning,...
---------------------------
IT & Engineering Professionals w/ Poly
SRA International
Herndon, VA
Business focuses on providing high-end information technology solutions and support to clients within the ... Architects ? Configuration Management Specialists ? Software Engineers ? Software Developers ? Geospatial...
---------------------------
IT Application Analyst
Saint Barnabas Health Care System
Oceanport, NJ
projects. Participate in and provide leadership for development and support of automation initiatives. Research ... skills. Experience in w orking with and developing hospital information systems. Patient Accounting and/or registration...
---------------------------
IT Mgr Software Engineering
Apollo Group
Phoenix, AZ
supervision and the software development guidelines and technology standards defined by Apollo Corporate IT, this ... Experience supervising and/or leading other professional level IT staff is required...
---------------------------
Senior Software Developer - Info Technology Job
Mercer
Deerfield, IL
Senior Software Developer - Info Technology-DEE000C5 Description Mercer is the global leader for trusted Human Resources ... information, please visit us at: www.mmc.com/diversity. Job Information Technology/Software Development Primary Location...
---------------------------
Account Manager - IT Staff Augmentation/IT Consulting Services
TNT Staffing
Emerson, NJ
for highly motivated, dynamic Information Technology (IT) Sales Professionals to join our growing IT Staffing ... and a passion for relationship building and business development. The right candidate will have a successful...
---------------------------
Software Development Manager 2 - Health IT
Northrop Grumman
Providence, RI
Northrop Grumman is seeking an experienced Software Development Manager to join our team of qualified, diverse ... years of relevant experience - Experience with IT Project Development Lifecycle - Strong Medicaid/Medicare business...
---------------------------
Software Development Analyst 2 - Health IT
Northrop Grumman
Providence, RI
Northrop Grumman Information Systems Sector is seeking a Software Development Analyst 2 to join our team of qualified, ... development life cycle (SDLC) in support of application software from design, development, testing, documentation...
Jobs
by
Simply
Hired
View all jobs