aspose file tools*
The moose likes JDBC and the fly likes hsqldb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "hsqldb " Watch "hsqldb " New topic
Author

hsqldb

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
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

Joined: Dec 20, 2006
Posts: 2516
    
  10

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


OCUP UML fundamental and ITIL foundation
youtube channel
sachin kelkar
Greenhorn

Joined: Aug 21, 2005
Posts: 17
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

Joined: Aug 30, 2005
Posts: 407
Hi Thanks --- but that tutorial is for windows- I need it to be cross platform...
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hsqldb