Relational databases support the facility of a two phase commit. That is, any changes made to the database require that a commit is requested before the session is disconnected. If the session is disconnected without a commit, then the changes are unwound and discarded leaving the database in the state it was in after the previous commit.
Sometimes people place a commit after every transaction. This is somewhat wasteful and can lead to low performance. Placing a commit every 25 or so transactions is better.
You do need to be sure that you have made the changes you need to and that any referential integrity is maintained and any constraints on the data are satisfied, otherwise the commit may fail.
Prev | Home | Next |
Connection.beginTransaction() | Up | Connection.connected() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |