Your understanding of the implementation is correct. There is no transaction isolation in the version you have studied, but this feature is being added. The methods for isolation levels are part of the JDBC standard.
 
Isolation may be necessary for certain applications, especially existing and legacy applications. But serious applications such as banking can be designed with highly normalised schemas without any transaction isolation.
 
Durability is achieved by persisting data to one or two files. HSQLDB use file sync so that changes to data are fully persisted at user-defined intervals. This translates to about 99.999% reliability for new data, given an average one crash a day. As actual systems are probably 10 - 100 times more reliable, then it translates to up to 99.99999% reliability. Note that even in the event of a crash, the record of data changes that occured prior to the last interval would remain intact.
 
Fred Toussi
----- Original Message -----
From: Irum Godil
Sent: 28 February 2005 16:26
Subject: [Hsqldb-developers] Transactions in Hsql

Hi,
 
I am a graduate student at the University of Toronto. I am working in Aspect Oriented Refactorings, and am interested in exploring the HSql codebase for Transactions refactoring.
 
I would like to understand how are transactions implemented in HSql. From my inspection of Hsql code base, I have come to the following conclusions. I was hoping if someone can confirm that these are correct, and also point out anything I may have left out.
 
1) Atomicity: Atomicity is obtained via commit and Rollback features. By default AutoCommit is turned on, but if we want to treat a collection of commands as a transaction, then we could set autoCommit(false) and have explicit commit after the statements
 
2) Consistency: This is obtained via Locking the Database file while it is being used, and supported via LockFile.java class and its uses
 
3) Isolation Level: I see that HSql supports Transaction_Read_Uncommited, however in the code I only saw calls to setting and getting the isolation level. What other classes/methods support Isolation in HSql?
 
4) Durabiltiy: I am assuming that the whole org.hsqldb.persist package is supporting this via persisting data. Am I right?
 
Are there any documentations available on Transactions in HSql? I will really appreciate your help on this.
 
Thanks a lot.
Sincerely,
Irum Godil.


Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.

Reply via email to