I am newbie in hsqldb.
In the project I am using Spring 4
, Hibernate 5
and HSQLDB
.
I am having some specific task and I am trying to use HSQLDB
as a portable database, which can be transferred to a flash drive or another computer.
I already have an sql-script with all tables and basic-needed data. I have four questions that are haunting me. (I'm sorry in advance if these questions are very stupid):
I need to make the script run at the first launch of the program, and in the other launсhes it must to check if database already exist and (if it already exists)only update data in it. (the program would be used in many computers and the database must be created after the first launch). How can I do this? Is it possible? Can you give some basic advice or example about how I can to do that?
I am trying to find some information about saving all database info in some file in the file-system. Can you give me please some valid examples about saving hsqldb data in file and about using this file after another launch.
Can I place this file in my
project.jar
file and to work with all data from it update it e.t.c. ?What is the best practice to make my database portable(for specific tasks) and where should I keep it? In file, in my project jar.e.t.c.?
Thanks in advance for your answers!