HSQLDB Cached Table Versus Memory Table Performance & Conversion

In short in HSQLDB cached table sucks in terms of performance. To elaborate I was running a program which takes around 9 hours running on two medium sized cached tables (bigger one 163 MB). I changed the tables to memory tables (default) and it now takes less than 10 minutes. Let's see how we can easily convert memory table to cached table and vice-versa.

Full article (336 words) »

How To Quickly Backup HSQLDB Database…

HSQLDB is a high performance RDBMS written in pure Java. It can be used as a in-memory database or regular file based database. It can also create a read-only database out of any CSV files. HSQLDB is the database used with OpenOffice. The steps to quickly and safely backup HSQLDB Database are: Full article (188 words) »

HSQLDB Tip: Case Insensitive LIKE Query in HSQLDB RDBMS & Space Crunched String Comparison

HSQLDBI previously discussed how to extend HSQLDB relational database with simple Java functions. The example there actually implements case insensitive like query functionality for HSQLDB. Read the article to get an understanding of how to write such custom functions and how to use them. Then read below to find a solution for performing space crunched comparison of strings.

Full article (237 words) »

Tip: How To Extend HSQLDB RDBMS With Java Functions

HSQLDBHSQLDB is an unique high performing, high quality Java based relational database which can be very easily extended with simple Java static functions. Here we will see how you can easily extend the database capability with a real-life example.

Full article (243 words) »

What is The Best Database for a Souped Up Hashtable?

All I really want is to store a very large Hashtable with more reads than writes. It should be able to deal with more than 8GB of data. The key will be a String of limited length. I want it to be extremely fast on read-access, stable with sudden shutdown and other issues beyond our control and with very low CPU usage. The leading contenders in my mind are:
1. HSQLDB
2. H2 Database, from the creator of Hypersonic SQL which is the predecessor of HSQLDB
3. Berkeley DB (Java version)
4. MySQL (least preference)
5. Derby Database
6. One$DB
7. Home-brewed implementation of a souped up Hashtable
8. Prevayler

Full article (158 words) »

Java: How To Get Auto Increment Values After SQL Insert

While inserting a SQL query we do not specify the auto increment values, if any. However they are often required for further processing. Here is how you can obtain auto increment / auto generated values after a successful SQL INSERT statement. Full article (129 words) »

How To Escape Column Names in HSQLDB RDBMS

HSQLDBSometimes you need to have database column names with space or other non-standard characters. The standard procedure is to escape them with backtick (`) character. HSQLDB doesn't accept either backtick or single quote as escape character. Instead you have to use escaped double quotes as shown in the example below:

st.execute("CREATE TABLE sheet (tg_meta_id int identity primary key, tg_meta_batch int, SKU varchar(255), \"Data Source\" varchar(255), \"e-Biz Manager\" varchar(255))");

Actually it accepts double quotes but as it is embedded within a String enclosed in double quotes, you have to escape the double quotes.

Protected by Comment Guard Pro