Using Your Database

Acceptable Databases

VARS was originally developed on Microsoft SQL Server and was ported to Apache Derby with relatively little effort. However, some changes in the datatypes used in the knowlegebase were required. VARS has been deployed on the following databases:

Setting up the Database

Schema

In order to run VARS you must set up the required database tables. VARS does not depend on any triggers or stored procedures in order to run. However, you may feel free to add them if needed. For example, you may want to setup triggers that log the history of changes for a particular table. Also, you may add whatever columns you wish to a table; for example, if you setup database replication you may need to add additional columns. However, do not remove any columns that are listed in the schema. They are required by VARS. There are currently 2 reference implementations available, I recommend that you use the SQL Server Schema as a base for your database schema.

Reference implementations:

You will also need to initialize values in the UniqueID table. SQL for inserting the needed values can be found in vars-insertInitialUniqueID.sql

Permissions

VARS is setup to use a database user when connecting. Be sure that the user has read and write permission to the VARS database tables.

Annotations View

The VARS Query application uses the Annotations view in order to retrieve data. You can modify the view to suit your needs, such as changing the names of the returned columns, adding additional columns or removing existing columns from the view. However, the following columns are required by the query application (i.e. do not remove or alter these columns):

Configuring VARS to use your database

JDBC Driver

To use your database you will need a JDBC Driver. Here is a list of possible JDBC drivers:

Place the JDBC driver jar file in VARS_HOME\lib.

Modifying VARS to use your Database

The VARS download contains a preconfigured Apache Derby database that is suitable for testing, development and deployment. However, if you would like to configure and install VARS on your own database server. Instructions for the different database servers can be found at:
  • Apache Derby [In progress]
  • Microsoft SQL Server 2008 [In progress]
  • PostgreSQL