    Index

| ## Using HSQL Database Manager for Sharp |

The main functions of the HSQL DatabaseManager for Zaurus are

- Starting HSQLDB.
- Connecting to a database.
- Executing scripts.

There are four different panels which may be chosen from the 'View' menu or with one of the four buttons under the menu:

### Starting HSQLDB.

HSQLDB for Zaurus is started with the appropriate icon , usally located under the Jeode tab. By default, a database called 'test' is opened and the tables in this database are displayed in the tree panel.

To get an impression of the functionalty, insert some test data by selecting the appropriate point in the 'Options' menu.

### Connecting to a database

To open a different database, select 'Connect' from the 'File' menu. Select 'HSQL Standalone' as type, and replace the database name 'test' in the URL with a different name.

If you want to use a different database system (usually on your desktop) you need the appropriate JDBC driver for that system.

### Executing scripts

You may save and open scripts with the appropriate functions in the 'File' menu. A script consists of one or more valid SQL statements. For example, you may save often-used SQL queries on your tables. If a script is opened, it is shown in the command panel and can be executed from there.

### Tree panel

The tree panel shows all the tables in the connected database. Use the plus signs to expand the tree. For each table there is a list of the columns with their data type.

### Command panel

The command panel is used to edit any SQL statement. Use 'Save Script' in the 'File' menu to save the SQL statement.

The SQL command is executed by clicking on the 'Execute' button at the bottom of the command panel, or by pressing Shift+Enter or Ctrl+Enter. The result is shown in the result panel.

Any executed SQL statement may be re-loaded to the command panel by selecting from the 'Recent' menu.

### Result panel

The result of an executed SQL statement is shown in the result panel. In the 'View' menu, you can choose between a text view or a grid view of the result rows.

If you select an SQL statement from the 'SQL' menu, the keyword is pasted into the command panel and the syntax of that SQL statement is shown in the result panel.

### Editor panel

The editor shows different forms:

- a search form
- an entry form for every table in the database

#### Search form

The editor comes up with a search form where you can select

- the table that should be searched through,
- one or more words (or numbers) that should be searched for,
- whether the rows that are searched contain all or just one search word,
- whether the case of the search word should be respected,
- whether the search words can be a part of a column or should match the whole column.

When clicking on the 'Search Rows' button, all rows of the chosen table that meet the search criteria are identified and the first row is shown in a table form.

When clicking on the 'Insert New Row' button, an empty table form is shown and one may type a new row for the selected table.

#### Table form

For each table that has a primary key in the database there is a specific table form which shows the column names to the left and entry fields to the right.

For each reference to another table, a choice field is generated which holds the values of all the rows of the referenced table.

The entry fields for columns that belong to the primary key of the table are not editable. If you want to update a part of the primary key, you have to delete the row and insert a new row.