Quick Install Guide

Requirements

  • Any Java-enabled plaform (Windows, Linux, Solaris)
  • Java SDK (Download from Sun)

Installation

  1. Download & unzip the UnityJDBC Package
  2. Copy UnityJDBC.jar into your classpath. For Windows the classpath is usually C:\Program Files\Java\jre1.5\lib\ext
  3. (optional) Copy the JDBC drivers of the databases that you require into this directory as well. Some JDBC drivers for common databases are available in the directory OtherJDBCDrivers included in the package.

Testing

  1. Go to the directory where you unzipped the package and into the subdirectory code.
  2. Compile and the test program called test/ExampleQuery.java.
    javac -cp .;../UnityJDBC.jar;../sampleDB/hsqldb/hsqldb.jar test/ExampleQuery.java
    java -cp .;../UnityJDBC.jar;../sampleDB/hsqldb/hsqldb.jar test.ExampleQuery
    

Setting up your environment

  1. Ensure the JDBC driver for your source data database system and UnityJDBC driver are correctly installed in your classpath (See Installation)
  2. Create an XML sources file that contains your source(s) connection information. For an example, see the UnityDemo.xml file in the test/xspec directory.
  3. Build an XML description of each source (called an XSpec). Use the graphical program unity/extractor/SourceBuilder.java to help build these files. You may run the program directly or use the script files initsources.bat (Windows) or initsources.sh (Linux). These XML files are used by the UnityJDBC driver to perform optimization and validation before querying the actual data source.

Writing your own query porgrams

Copy the file ExampleQuery.java to MyQuery.java. There are 2 lines that you must modify. The first line indicates where your new sources XML file is located on your machine. You may specify an absolute or relative path from the current directory. The second line you must modify is to change the SQL query to reference fields and tables in your data source(s). Compile and run the program. Then add more data sources to your XML sources file as in Step #4. Queries can reference any table or field in any data source in your XML sources file as long as you prefix a table or field with the database name such as MyDB.MyTable.MyField.

User Documentation | Community Forum | support@unityjdbc.com