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:- Apache Derby
- MySQL
- Microsoft SQL Server
- Oracle
- PostgreSQL
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:
- Microsoft SQL Server: VARS Annotation SchemaVARS Knowledgebase Schema
- PostgreSQL: VARS Annotation SchemaVARS Knowledgebase Schema
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):
- ConceptName
- LinkName
- LinkValue
- ObservationID_FK
- ToConcept
- VideoFrameID_FK
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:
- IBM DB2 - Drivers included in DB2 Server Installation ([DB2 Install]\java\db2java.zip)
- Apache Derby - Included in the Apache Derby Release download
- Hypersonic SQL - Included in the HSQL Release download
- IBM Informix - Drivers can be found at http://www.iiug.org/home.html
- InstantDB - http://www.instantdb.com/
- Borland Interbase
- MySQL - MySQL Connector/J
- Microsoft SQL Server - jTDS
- Oracle - Oracle JDBC Driver
- PostgreSQL - PostgreSQl JDBC
- SAP DB/MaxDB - MaxDB JDBC Driver
- Sybase - JConnect for JDBC, jTDS
Modifying VARS to use your Database
- Apache Derby [In progress]
- Microsoft SQL Server 2008 [In progress]
- PostgreSQL