Using this Database Example with JDBC Mediator
==============================================

Three steps to running the example
----------------------------------

1. Installing our Tables (MySQL Only)

In order to create the database structure from which you are able
to load the output results, you will need to run the `create.sql'
scripts in the `Data' subdirectory. Open the MySQL prompt from
the `Data' subdirectory and:

    a) Select (or create and then select) a database you can spare
       for a table named COUPONS. For example, if you have decided
       using the `test' database, you would optinally type the
       SQL command to create it (unless it already exists):
       
           CREATE DATABASE test;
       
       and then, you would type the following to select it:
       
           USE DATABASE
    
    b) Run the `create.sql' SQL script located in the `Data'
       subdirectory of the current directory by typing at the
       same MySQL prompt the following:

           source create.sql
       
       If this fails, make sure you have started the MySQL prompt
       from the `Data' subdirectory (this is where the database
       files for this example are stored).

2. Configuring the Database Connection

Edit the Java source code file by filling out JDBC information
about your database, such as:

    a. Driver Name (e.g. com.jdbc.mysql.Driver)
    b. JDBC Url (e.g. jdbc:mysql://localhost/test)
    c. Username and Password

If you are unsure whether you have a JDBC Driver for your Database,
skip this step and try running the example with the predefined
values. If that fails, you will need to probably download the
latest driver.

3. Running the example

    Run the `compile' script (compile.sh for Linux, compile.bat
    for Windows) to compile the Java source code, and then
    the `run' script to see the results.
 

Uninstalling the Source Data
----------------------------

To delete all the tables used in this example, open the MySQL
prompt from the `Data' subdirectory, select the database where
you created the tables, and run the following:

    source delete.sql

