home -> developer -> SQL -> tutorial -> install -> database setup

back next

Database setup

This section explains setting up a database for use with the WaterkenTM server. The Coffeebreak tutorial code is already set up; if you plan to use the provided MS-Access database, you only need to configure the data source for the database. Please see the MS-Access tips page for help setting up the Data Source Name on Windows. If you are using a database other than MS-Access, or hooking up a database other than the tutorial one, follow the instructions below.

Only two steps are needed to set up a database for use with the WaterkenTM server: creating the resource web folder and adding the resource web to the collection of hosted resources.

Creating the resource web folder

As explained in Directory structure, the files defining a resource web reside in a subfolder of xdb/. Create a new folder for your database as described.

Each resource web folder must contain an index.xml file that overrides the default creation of an index file. If this file is not present, the security properties of the web-calculus are broken. As soon as you have created your new folder, add an index.xml file to it. The index.xml file should contain XML of type <http://waterken.com/doc/pointer/Broken>. Therefore, the XML file contains only:

<doc schema="http://waterken.com/doc/pointer/Broken"/>
            

Hosting the resource web

To begin serving requests to your new resource web, you must bind it to a base URI. When the WaterkenTM server receives a request, it checks the config/xdb/ folder for a configuration file corresponding to the base URI of the target resource. The configuration filename is determined by the base URI. For example, the resource web created in this tutorial is hosted on the base URI: https://www.waterken.com/coffeebreak/. The corresponding configuration filename is: config/xdb/www.waterken.com/coffeebreak/https.xml.

To host a WaterkenTM RDB Webizer resource web, the configuration file must contain XML of type <http://waterken.com/sql/http/Server>. Consult the schema file for detailed information about the configuration options. The two main configuration elements are at: epoch/importer/files/base/root/path/ and database/loader/.

epoch/importer/files/base/root/path/

This element contains the path to the resource web folder you created in the previous setup step. The path is relative to the root of the WaterkenTM server installation.

database/loader/

This element provides the information necessary to open a JDBC connection to your database. For detailed information about the configuration options, consult the schema file: <http://waterken.com/sql/database/jdbc/Loader>.

The next page begins discussion of the sample code.

top

Copyright 2002 - 2003 Waterken Inc. All rights reserved.

Powered by Waterken Server! Valid XHTML 1.0! Valid CSS!