Successfully!

Error!

Built-in HSQL FineDB

  • Last update:  2020-12-29
  • I. Overview

    The article introduces the purpose of FineDB, an HSQL database built-in FineReport, as well as the way to connect to it.

    You will learn
    • Introduction

      • Path

      • Content

      • Database File

    •  Make Changes to FineDB with Data Entry

      • Connect to FineDB

        • add connection

        • define connection

        • add query

      • Make Changes to FineDB

        • design a template

        • settings of data entry attribute

        • update data

    • Make Changes to FineDB with DB Tools

    II. Introduction

    1. Path

    FineDB is stored in %FR_Home%/webapps/WEB-INF/embed.


    2. Content

    The database contains all the information about Decision-making System (including directories and task schedules) except platform configurations.


    3. Database File

    If exists (on the first-time   installation)FilenameIf necessaryContent

    Yes

    db.properties

    Yes

    Properties of the HSQL database

    Yes

    db.script

    Yes

    Tables and data

    No

    db.lck

    No

    Indicates that the database is running

    No

    db.log

    No

    Changes in the database

    Yes

    db.lobs

    No

    Certain types of data

    No

    db.tmp

    No

    Directory for temp files

    Note: Some other files will be auto-generated if the database is accessed after its first-time installation.


    III. Make Changes to FineDB with Data Entry

    1. Connect to FineDB

    1) Click Server -> Define Data Connection and add a JDBC connection. You can name the connection as you like.

    2) Define Data Connection

        a) Select Others for Database

        b) For Driver, enter "com.fr.third.org.hsqldb.jdbcDriver"

        c) For URL, enter "jdbc:hsqldb:file://${ENV_HOME}/embed/finedb/db"

        d) For User Name, enter "sa"

        e) For Password, leave it blank

    3) Click OK and add a DB Query. Select the defined data connection to list out all the data tables within FineDB.

    Note:

    • It is essential to enforce control over data connections after connecting to FineDB, otherwise, the configurations stored in the database will be exposed to the risks of unauthorized access and tampering.


    2. Make Changes to FineDB

    The data stored in FineDB can be modified by users using data entry templates. You can find a brief example below on how to edit data of the username table PUBLIC.FINE_USER.

    1) Design a Template

        a) Create a new DB query "ds1" with the following SQL query:

            SELECT * FROM PUBLIC.FINE_USER

        b) Drag and drop ID, REALNAME and USERNAME columns into the template.


        c) Select A1:C1, switch to Widget Settings in the right pane and add Text Fields to the selected cells.


    2) Settings of Data Entry Attribute

        a) Go to Template -> Data Entry Attribute.

        b) Add Built-in SQL in Submit tab and select Smart Submit for Submit Type. For Database, select the data connection defined earlier, and PUBLIC.FINE_USER for Table

        c) Bind data columns to cells and check the box in column Key for ID.

    3) Update Data

    Click Data Entry Preview and change the Username and Realname of Anna to "test".

    Submit and refresh the page. You can see that the names are now changed to "test".

    IV. Make Changes to FineDB with DB Tools

    Please refer to Using third party tools to connect to FineDB for more information.


    Attachment List


    Theme: Decision-making Platform
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback