Cloudscape Basics and the Sample Database
Page 6 of 6

Building the Database toursDB

Now that you know the basics of how a Cloudscape application works, you will run a program from the JBMSTours package to create the toursDB sample database described in Chapter 1, "Overview".

(The installation includes a pre-built version of toursDB, which is in the /demo/databases directory under the cloudscape base directory. But for the purposes of this tutorial, do not use that version.)

Run JBMSTours.CreateToursDB

JBMSTours.CreateToursDB is a Java application that creates the toursDB database (and connects to it), creates all the database's dictionary objects, such as tables, indexes, and views, and then populates the core tables with data. (You will examine the dictionary objects and the data in the next chapter.)

Compiled classes are included in the demo/programs/tours/JBMSTours directory. You will also find the source files there.

To run JBMSTours.CreateToursDB:

  1. Return to the first command prompt window that you opened. You should be in the your_tutorial_home directory.
  2. If you are running on a UNIX platform, you may need to relax your file descriptors limit. For more information, see Appendix A, "Troubleshooting Common Problems".
  3. Run the program, using the -D parameter to set cloudscape.system.home:

    java -Dcloudscape.system.home= your_tutorial_system
        JBMSTours.CreateToursDB

The program takes a few minutes to run, depending on your configuration. While it runs, it prints messages about the tasks it is performing, such as building tables, constructing objects, and inserting data. When it is complete, it displays the following:

Committed transaction and closed connection
Database shut down normally
CreateToursDB finished

Congratulations! You have successfully built two databases, including the toursDB sample database. You are ready to move on to the next chapter.

Table 7 Tutorial Labs Reference Sheet
  • yourClassPath

    The complete list of paths to directories and libraries needed to run the applications in this tutorial. See Getting Acquainted with Class Path.

  • classPathScript

    The script text file you copied from scripts to your_tutorial_home and modified to run as a script that sets your class path. See Customize Your setclasspath Script. To run it, see Running the Script.

  • your_tutorial_system

    The path to your system directory, the directory that contains your databases. In this tutorial, it is the tutorial_system directory that you created in Getting to Know Your System Directory. This directory will contain the databases that you create in this tutorial, as well as the information log and properties file.

    -Dcloudscape.system.home = c:\tutorial_system

  • demo/programs/tours/JBMSTours

    The default installation includes a directory called demo. Inside this directory is a subdirectory called programs/tours, which contains the JBMSTours package. Source files are located there, as well as the javadoc subdirectory.

  • javadoc

    Javadoc is automatically generated HTML documentation about Java classes. Javadoc for the JBMSTours application package are in the subdirectory javadoc within demo/programs/tours. For example, javadoc for the JBMSTours.serializabletypes.City class is in demo/programs/tours/javadoc/JBMSTours.serializabletypes.City.html

  • scripts

    This directory contains scripts and some example Java source files.

    scripts is a subdirectory in demo/programs/tours (in the cloudscape base directory). Copy these files to your_tutorial_home; don't alter the original files.

  • your_tutorial_home

    This directory should be your home base when working in a command window. In other words, execute all commands from this directory unless otherwise directed. Copy example scripts and source files from scripts to this directory. Also contains the classPathScript that you create.