• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Where does the hsqldb database file (*.data) go?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I deployed JForum war to my Tomcat server. During the first run, I installed the hsqldb database successfully. With severl tries, I found a bug and I wanted to see what got stored in the database. So, I tried to locate the hsqldb database file.

It's very strange to me that I could see the created hsqldb database files except the major one, the .data file. The .lck, .log and .properties are there. Can any one tell me where the .data file go?

Thanks in advance!
Michael Wu
[originally posted on jforum.net by michaelwu]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The .data file only shows at runtime, and only if you use CACHED tables. Beyond that, everything is placed in the .script and .log files. All the files will be in the same directory.

Documentation

FYI, HSQLDB works in a rather interesting fashion. Rather than storing the raw data on disk, it stores the scripts to recreate the database. So you're unlikely to find much more than very large script and log files at any given time.
[originally posted on jforum.net by jbanes]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the informaiton. Now, I got it.

But, it's really strange for me that hsqldb takes this approach. In the long run, when the database grows to certain size, restart the database may take some time!

[originally posted on jforum.net by michaelwu]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

michaelwu wrote:But, it's really strange for me that hsqldb takes this approach. In the long run, when the database grows to certain size, restart the database may take some time!


Don't worry, you're not the only one shocked by this design. ;)

It's actually a very good design for an embedded database. It simply doesn't scale to enterprise usage. Which is why it's important to keep in mind that HSQLDB is an embedded database. It will work for testing and small forums, but it's best not to deploy it on a busy forum. 8)
[originally posted on jforum.net by jbanes]
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic