Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hsqldb

 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,

The hsqldb site has extensive, good, documentation.

See SqlTool Manual.
It contains info on how to do interactive or scripted sql, and refers to an example sql data load script (see section Loading sample data).
Regards, Jan
 
sachin kelkar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thanks --- but that tutorial is for windows- I need it to be cross platform...
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jay,

Sachin's instructions are so generic, that you will be able to port them to your operating system. Give it a try.

Regards, Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic