Originally posted by jay vas:
Hi Guys : I tried porting mysql to hsqldb and found it virtually impossible. I also find the hsqldb has the worst documentation of any major database product that Ive come across .... for example, there is no hello world tutorial. I was quite dissapointed because I thought a standalone java database would be easy to install. I even found that once I got hsql working, its files were either not being stored, or being stored in a mysterious location.
Anyways, I was wondering if any of you has seen a GOOD tutorial on how to load data into hsqldb from a standard sql file, or if any of you has succesfully used hsqldb in a production level app... It seems promising but it initially has come across to me as very poor.
Jay
I think hsqldb has good and rich documention.
If you want do some tutorial.
Here is one for you!
1> Need jdk1.6.X
2> unzip hsqldb_1_8_0_7;
3> set environment variable(Windows)
control panal-->system->advanced-->env variable-->user variable-->
new button-->
vname HSQLDB_HOME
vvalue X:\hsqldb_1_8_0_7\hsqldb(location)
4>set classpath=.;%HSQLDB_HOME%\lib\hsqldb.jar;
5>open command prompt;
6> X:\hsqldb_1_8_0_7\hsqldb\data>java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb
7>open another command prompt;
8>X:\hsqldb_1_8_0_7\hsqldb\lib>java -cp hsqldb.jar org.hsqldb.util.DatabaseManager
9>connect window(Database Manager) will open;
9>select type -" HSQL Database Engine server"
10>URL jdbc:hsqldb:hsql://localhost/xdb
11>ok;
12>Database Manager will be connected to HSQL Database Engine server;
13>menu(command)create tables or perform your sql commands;
Create a directory called data in the root of the development
directory - this is where HSQL DB will store its data files.
Now start the database by running java -classpath ../lib/hsqldb.jar org.hsqldb.Server
in this data directory
see Server and Web Server Properties in guide.pdf
Sachin