Tuesday, November 29, 2011

Why we need the transactions?

Transactions ensure that database actions are consistent. Consider a case where a record is required to be added to say two databases simultaneaously. If the record is added to both the databases, action is consistent & transaction is complete but if the record is not added to one of the databases, then the action of "Add" record is rolled back across both the databases for this record, making records in both the databases consistent. Transactions ensure atomic nature of database action.
Category:EJB Interview Questions

No comments:

Post a Comment