Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

BELC uses a database to store BEL Documents and compiled KAMs. The BEL Framework has an internal database that is configured to be used by default. The BEL Framework can optionally be configured to use MySQL 5.x and Oracle 11.x database management systems.

Anchor
_Toc189031672
_Toc189031672
Configuring the Internal Database

The BELFramework ships with a copy of Apache Derby 10. This database is a high-performance SQL compliant RDBMS written in Java that uses the host file system to store database tables and data. Derby is configured as the default database for both the DocStore and KamStore databases. For more information about Derby please see the Apache Derby web site at http://db.apache.org/derby
The current version of the BEL Framework supports Apache Derby in embedded mode. In this mode the Derby database runs within the same JVM as the application. This mode is single-user and will not support multiple users accessing the same.
Note: The config folder in the install directory contains a basic configuration file for Apache Derby support called belframework.embedded.cfg. We suggest that you modify a copy of this file and rename it to belframework.cfg in order to use the embedded database.

Anchor
_Toc189031673
_Toc189031673
Database Files

In embedded mode Apache Derby uses the host file system to store the files that are used to contain the tables, indexes, data, and other artifacts for each database. By default, the BEL Framework stores these files in a folder pointed to by the variable
{home}/.belframework/database
You can change this setting by adjusting the JDBC URLs for the docstore_url and kamstore_url parameters.

Anchor
_Toc189031674
_Toc189031674
Database Users and Passwords

As the Derby database runs in single-user embedded mode, there is no need for passwords or user accounts. The default configuration for Apache Derby has the docstore and kamstore user and password information disabled.

Anchor
_Toc189031675
_Toc189031675
Schema Names

The database schema names for the docstore and kamstore databases are controlled by the docstore_schema and kamstore_schema_prefix parameters.

Anchor
_Toc189031676
_Toc189031676
Configuring MySQL 5.x

The BEL Framework can optionally use a MySQL 5.x database to store BEL Documents and KAMs. To configure a MySQL database you must change the settings in the belframework.cfg system configuration file.
Note: The config folder in the install directory contains a basic configuration file for MySQL 5 support called belframework.mysql.cfg. We suggest that you modify a copy of this file and rename it to belframework.cfg in order to use the MySQL database.
The BEL Framework uses a Type-4 JDBC driver to access MySQL databases. The database instance can be set up locally or on a remote server. The BEL Framework uses a JDBC URL to access the instance.
The actual JDBC MySQL URL may vary depending on your installation but generally are of the form:
jdbc:mysql://[host]:[port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]..
where
[host] is the name of the database server
[port] is the port the MySQL database is configured to listen at. This is usually 3306.
[database] is the name of a schema to connect to. This could be set to doc_store or kam_store_catalog if they already exist.
[propertyName] and [propertyValue] are pairs of optional parameters to be passed to the mysql JDBC connector.
A typical JDBC URL for the DocStore database on a MySQL 5 installation might look like:
jdbc:mysql://192.168.100.130:3306/doc_store?keepalive=true

Anchor
_Toc189031677
_Toc189031677
Managing Schemas

By default, this version of the BEL Framework will attempt to manage the MySQL instance, creating new and removing old schemas as needed. The user that is configured to access the database must have permission to create new databases, create tables and views, create indexes, and delete the same.
If you prefer to manage the MySQL instance yourself you must change the system configuration parameter that controls this function and create the schemas manually.

Parameter

Default

Description

system_managed_schemas

1

When set to one the BEL Framework will attempt to create and manage the KamCatalog and Kam schemas. Setting this to 0 will turn off this feature.

The following schemas are required in the MySQL instance:

  • doc_store
  • kam_catalog
  • kam{?} where {?} is a number identifying a specific KAM schema.

The BEL Framework provides the following set of SQL DDL files located in the [installdir]/setup/mysql folder to help configure the MySQL instance for use with the BEL Framework.

Schema

SQL File

doc_store

doc_store.sql

kam_catalog

kam_catalog.sql

kam{?}

kam.sql


The BEL Framework stores each KAM in a separate schema that is referenced by the kam table in the kam_catalog schema. In order to allow multiple KAMs to be stored in the KamStore, the DBA must create a set of KAM schemas and pre-populate the schema_name column for the kam table in the kam_catalog schema.

Anchor
_Toc189031678
_Toc189031678
DocStore Settings

The following parameters must be set to configure the BEL Workbench to use a MySQL database for storing BEL Documents:

Parameter

Default

Description

docstore_schema

doc_store

Name of the schema to use to create the Document Store.

docstore_url

 

JDBC URL for accessing the MySQL database.

docstore_username

 

Name of the database user with permission to create databases, create tables, perform queries, inserts, and deletes in the MySQL database.

docstore_password

 

Password for the docstore_username user.

 

Anchor
_Toc189031679
_Toc189031679
KamStore Settings

Anchor
_Toc146180276
_Toc146180276
The following parameters must be set to configure the BEL Workbench to use a MySQL database for storing KAMs:

Parameter

Default

Description

kam_catalog_schema

kam_catalog

Name of the schema to use to create the KAM catalog.

kamstore_schema_prefix

kam

Prefix for schema containing Kams generated by the compiler. Each kam schema will be created with a unique name using this prefix. For example kam1, kam2. The actual scheme depends on the database.

kamstore_url

 

JDBC URL for accessing the MySQL database.

kamstore_username

 

Name of the database user with permission to create databases, create tables, perform queries, inserts, and deletes in the MySQL database.

kamstore_password

 

Password for the kamstore_username user.

 

Anchor
_Toc189031680
_Toc189031680
Configuring Oracle 11.x

The BEL Framework can optionally connect to an Oracle 11.x database and use it to store BEL Documents and KAMs. To configure an Oracle database you must first setup the Oracle instance with the required schemas and the change the settings in the belframework.cfg system configuration file.
Note: The config folder in the install directory contains a basic configuration file Oracle 11 support called belframework.oracle.cfg. We suggest that you modify a copy of this file and rename it to belframework.cfg in order to use the Oracle database.

Anchor
_Toc189031681
_Toc189031681
Managing Schemas

This version of the BEL Framework will NOT attempt to manage the Oracle instance but assumes that every schema and user needed by the BEL Framework has been previously created by a DBA.
The following schemas are required:

  • doc_store
  • kam_catalog
  • kam{?} where {?} is a number identifying a specific KAM schema.

The BEL Framework provides the following set of SQL DDL files located in the [installdir]/setup/oracle folder to help a DBA configure an Oracle instance for use with the BEL Framework.

Schema

SQL File

doc_store

doc_store.sql

kam_catalog

kam_catalog.sql

kam{?}

kam.sql


The BEL Framework stores each KAM in a separate schema that is referenced by the kam table in the kam_catalog schema. In order to allow multiple KAMs to be stored in the KamStore, the DBA must create a set of KAM schemas and pre-populate the schema_name column for the kam table in the kam_catalog schema.

Anchor
_Toc189031682
_Toc189031682
Database Users

The following database users are suggested for use within the BEL Framework.

Suggested User

Schema

Required Access

doc_store

doc_store

Select from tables
Update tables
Delete from tables
Insert into tables

kam

kam_catalog

Select from tables
Update tables

kam

kam{?}

Select from tables
Delete from tables
Insert into tables
Disable / Enable table constraints
Truncate a table


Note the kam database user is used to access the kam_catalog and kam{?} schemas and therefore must have access to the all the kam-related schemas.

Anchor
_Toc189031683
_Toc189031683
DocStore Settings

The following parameters must be set to configure the BEL Workbench to use an Oracle database for storing BEL Documents:

Parameter

Default

Description

docstore_schema

doc_store

Name of the Document Store schema

docstore_url

 

JDBC URL for the Oracle database.

docstore_username

 

Name of the database user with permission to create session, create tables, create sequences, and create triggers in the Document Store database

docstore_password

 

Password for the docstore_username user.

 

Anchor
_Toc189031684
_Toc189031684
KamStore Settings

The following parameters must be set to configure the BEL Workbench to use an Oracle database for storing KAMs:

Parameter

Default

Description

kam_catalog_schema

kam_catalog

Name of the KAM catalog schema

kamstore_schema_prefix

kam

Prefix for schema containing Kams generated by the compiler. Each kam schema will be created with a unique name using this prefix. For example kam1, kam2. The actual scheme depends on the database.

kamstore_url

 

JDBC URL for the Oracle database

kamstore_username

 

Name of the database user with permission to create session, create tables, create sequences, and create triggers in the KAM catalog schema. Each KAM schema must also be accessible and modifiable by the KAM catalog schema

kamstore_password

 

Password for the kamstore_username user.