Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HSQLDB - which is the main database file

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?

like image 534
Vivek Avatar asked Jun 24 '11 18:06

Vivek


2 Answers

I think you should have a .data file after adding records to database. In the case I'm wrong here are the documentation for you:

http://hsqldb.org/doc/guide/apc.html

http://hsqldb.org/doc/guide/ch04.html

like image 65
ahmet alp balkan Avatar answered Oct 09 '22 12:10

ahmet alp balkan


.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

like image 29
peshkira Avatar answered Oct 09 '22 13:10

peshkira