Question: I have a sample application which loads 2 records ro database and then fetches all the records from DB and prints info from every record.

My problem is follow: when I run program, it fetches only records which inserted on this running, but not before, Also, when I'm opening DB with SQirrel, there is no such database.

Here is my Hibernate config:

```
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
    <session-factory>
        <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
        <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
        <property name="connection.url">jdbc:hsqldb:hibertest</property>
        <property name="connection.username">sk</property>
        <property name="connection.password">0000</property>
        <property name="show_sql">true</property>
        <property name="current_session_context_class">thread</property>
        <property name="hbm2ddl.auto">update</property>

        <mapping class="models.Work" />
    </session-factory>
</hibernate-configuration>

```

What I'm doing wrong?

Answer: 
I am not experienced with HSQLDB but try the following URL:

```
<property name="connection.url">jdbc:hsqldb:file:hibertest;shutdown=true</property>

```

See: [*Connection URL* documentation](http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_connection_url).
You can persist the Data using the HSQL by doing the following,
1. 

```
 Connection c = DriverManager.getConnection("jdbc:hsqldb:file:/opt/db/testdb", "SA", "");

```

**"/opt/db/testdb" here is the DB location in the disk.**

2. `CREATE **TEXT** TABLE <tablename> (<column definition> [<constraint definition>])`  

3. Assign the source for the Table  
 `SET TABLE mytable SOURCE "myfile;fs=|"`

Ref: <http://hsqldb.org/doc/2.0/guide/texttables-chapt.html>

My Github Repository shows the sample <https://github.com/Ayyamperumal/HSQL/tree/master/SampleHSQLdb>

you can use "Database Development" perspective from Eclipse to see the data. (Supply hsql jar as the driver) Or Execute **org.hsqldb.util.DatabaseManager** from the hsqldb-\*.jar to get the GUI for seeing the data.