# Data Frame With Database Connection

HUGIN can extract data from an Apache Derby database into the data frame. This functionality is available from the ‘Data’ menu item in the HUGIN main window. Apache Derby is a database project purely written in Java allowing for flexible database integration in Java programs. More information can be retrieved on the Apache Derby project’s website.

A screenshot of the “Database Connection” panel can be seen in Figure 1.

To connect to a Derby database the user needs to specify the following:

- “Database Connection”: Enter the database connection details in the field labeled . What to type here depends on the configuration of the database. It can be located either on the local file system or it may be configured as a server on a network location. Turn to the Derby Reference Manual for more details.

- “SQL Query”: The query to be executed. The Derby Reference manual, found on Apache Derby project’s website documents the Derby SQL language.

- “Overwrite existing data”: Indicate whether the extracted data should overwrite the existing data i the below data matrix. If the box is selected, the existing data will be deleted and replaced by the new data. Otherwise the data will be appended.

The current version of the Derby Database driver included in HUGIN is Derby 10.14.1.0 Release, so you should be looking for the 10.14 Derby Reference Manuals.

Once extracted, the data can be inspected, manipulated just as if the data had been read from a file in an ordinary Data Matrix Frame. Changes in the data will not take effect in the database but the extracted (and perhaps edited) data can be exported to a file using the “Save As” accessible through the “File” menu item.

Figure 1: Derby Database Connection Window.