HSQL and Read Uncommitted

As a database person, the second step is to design database schema. I am going to push much to the database. The JSP will be a thin presentation layer to present different views of the database.

The initial deployment will not require high volume. But, I expect it will in the future. After a brief sketch of ER diagram, I am start picking a test database.

I came across HSQL, the Java embedded database a few times when I was working on Castor JDO. So, it was my first choice. The User Guide is very good. Clean, direct, and straightforward without any marketing talk. Small download and its claims good performance.

As I was reading it, I found myself a little bit disappointed to
the transaction support
. It supports only at READ_UNCOMMITTED level, the level 0, which means if user want to guarantee data integrity it has to access data in more restricted way or to do quite a lot of works themselves.

Whether it matters depends on application. To ensure data integrity with weak isolation from the database can be quite challenged, as the complexity of the database schema grows. However, stronger isolation will incur performance disadvantage and decrease concurrencies. It might not be feasible for high-volume app.

I would start with stronger isolation first and have the database do more work for me. I would also want the flexibility to turn by changing the isolation level. So, I know I will need to switch before my web app is deployed to the real world.

Tag: ,