HSQLDB - which is the main database file

Vivek picture Vivek · Jun 24, 2011 · Viewed 19.2k times · Source

I am using HSQLDB in the embedded mode.

jdbc:hsqldb:file:abc\\TESTDB;

After creating the database, the folder abc has the following files:

TESTDB.lck TESTDB.script TESTDB.log TESTDB.properties

My application is working properly

But my question is which is the main database file amongst the above-listed files?

Or is the main database file stored in some other location?

Answer

peshkira picture peshkira · Jun 24, 2011

.script contains all the statements to create the tables, alter them and insert the data. This file is created when you use hsqldb in memory. (so I'd say this is your database) Otherwise the database is stored in .data as other people already said

.lck is the lock file by which hsqldb knows whether the database is locked by a process. Usually you have this file only while your program is running and it is automatically deleted when you stop the programm.

.log contains internal log statements of running transactions for example and some commit or rollback points.

.properties contains the properties with which hsqldb is initialized (better don't change anything there if you don't know what you are doing). This is not to be confused with and persistence unit configuration.

kind regards