last update: 06/24/2004 17:33:26
This implementation provides the basic requirements for a JDBC Handler. The database structure is quite simple. It is a based on a Configuration table
T_CONFIGURATION
a Category table
T_CATEGORY
a Property table
T_PROPERTY
and a Variable table
T_VARIABLE

A Configuration can have 1:many Categories and 1:many Variables.

A Category can have 1:many Properties.

Implementation does require that the database support some sort of auto-increment for the object identifier (oid), if you want to store the Configurations.

One problem with the implementation is the ability to store the variable information within the properties. This is an inherent problem with all of the ConfigurationHandlers.

Following properties need to set inside of the jconfig.properties file:
org.jconfig.jdbc.driver
org.jconfig.jdbc.user
org.jconfig.jdbc.pwd
org.jconfig.jdbc.url

Here is the datamodel:


The SQL create statements for various databases are include in the distribution. Here is an example for MySQL:
/*==============================================================*/
/* Database name:  PHYSICALDATAMODEL_2                          */
/* DBMS name:      MySQL 3.23                                   */
/* Created on:     12.04.2004 13:40:38                          */
/*==============================================================*/


drop table if exists T_CATEGORY;

drop table if exists T_CONFIGURATION;

drop table if exists T_PROPERTY;

drop table if exists T_VARIABLE;

/*==============================================================*/
/* Table: T_CATEGORY                                            */
/*==============================================================*/
create table if not exists T_CATEGORY
(
   OID                            int                            not null AUTO_INCREMENT,
   NAME                           varchar(255),
   CONFIGURATION_OID              int,
   primary key (OID)
);

/*==============================================================*/
/* Table: T_CONFIGURATION                                       */
/*==============================================================*/
create table if not exists T_CONFIGURATION
(
   OID                            int                            not null AUTO_INCREMENT,
   NAME                           varchar(255)                   not null,
   primary key (OID),
   unique (NAME)
);

/*==============================================================*/
/* Table: T_PROPERTY                                            */
/*==============================================================*/
create table if not exists T_PROPERTY
(
   OID                            int                            not null AUTO_INCREMENT,
   NAME                           varchar(255),
   VALUE                          varchar(255),
   CATEGORY_OID                   int                            not null,
   primary key (OID)
);

/*==============================================================*/
/* Table: T_VARIABLE                                            */
/*==============================================================*/
create table if not exists T_VARIABLE
(
   OID                            int                            not null AUTO_INCREMENT,
   NAME                           varchar(255),
   VALUE                          varchar(255),
   CONFIGURATION_OID              int,
   primary key (OID)
);