Transaction processing should always deal with more than one statement and a transaction is often described as a Logical Unit of Work ( LUW ). The rationale for transactions is that you want to know definitively that all or none of the LUW completed successfully. Note that this automatically gives you restart capability. Typically, there are two conditions under which you would want to use transactions:
Multiple statements involving a single file - An example would be inserting all of a group of rows or all price updates for a given date. You want all of these to take effect at the same time; inserting or changing some subset is not acceptable.
Multiple statements involving multiple files - The classic example is transferring money from one account to another or double entry accounting; you don't want the debit to succeed and the credit to fail because money or important records will be lost. Another example is a master/detail relationship, where, say, the master contains a total column. If the entire LUW, writing the detail row and updating the master row, is not completed successfully, you A) want to know that the transaction was unsuccessful and B) that a portion of the transaction was not lost or dangling.
Therefore, determining what completes the transaction or LUW should be the deciding factor for transaction boundaries.
Posted Date:- 2021-09-04 05:57:46
If I Use The Jdbc Api, Do I Have To Use Odbc Underneath?
Where Can I Find Info, Frameworks And Example Source For Writing A Jdbc Driver?
How Can I Create A Custom Rowsetmetadata Object From Scratch?
How Does A Custom Rowsetreader Get Called From A Cachedrowset?
What Driver Should I Use For Scalable Oracle Jdbc Applications?
What are the isolation levels of connections in JDBC?
What is JDBC Transaction Management and why is it needed?
How Do I Receive A Resultset From A Stored Procedure?
How Can I Write To The Log Used By Drivermanager And Jdbc Drivers?
How Do I Check In My Code Whether A Maximum Limit Of Database Connections Have Been Reached?
Why Do I Get Unsatisfiedlinkerror When I Try To Use My Jdbc Driver?
Db2 Universal Claims To Support Jdbc 2.0, But I Can Only Get Jdbc 1.0 Functionality. What Can I Do?
How Do I Disallow Null Values In A Table?
What Are The Considerations For Deciding On Transaction Boundaries?
How Can I Determine Where A Given Table Is Referenced Via Foreign Keys?
What causes “No suitable driver†error?
Explain the usage of the getter and setter methods in ResultSet.
Can I Use Jdbc To Execute Non-standard Features That My Dbms Provides?
What Is The Significance Of Databasemetadata.tableindexstatistics? How To Obtain And Use It?
What Types Of Datasource Objects Are Specified In The Optional Package?
Which Java And Java.sql Data Types Map To My Specific Database Types?
When An Sql Select Statement Doesn't Return Any Rows, Is An Sqlexception Thrown?
What Is Optimistic Concurrency?
What Is Pessimistic Concurrency?
How Can I Tell If My Jdbc Driver Normalizes Java.sql.date And Java.sql.time Objects?
What is JDBC Batch Processing and what are it’s benefits?
I Need To Have Result Set On A Page Where The User Can Sort On The Column Headers. Any Ideas?
What Jdbc Objects Generate Sqlwarnings?
What Does Normalization Mean For Java.sql.date And Java.sql.time?
What Scalar Functions Can I Expect To Be Supported By Jdbc?
What Does Setfetchsize() Really Do?
How Can I Connect From An Applet To A Database On The Server?
What Is The Advantage Of Using A Preparedstatement?
What Is The Difference Between Directive Include And Jsp Include?
How To Pass Information From Jsp To Included Jsp?
Explain the types of RowSet available in JDBC.
What is the use of setFetchSize() and setMaxRows() methods in Statement?
Result Set’s index Starts with 0 or 1?