Documentation Archive Developer
Search
Table of Contents Previous Section

Installing the Movies and Rentals Sample Databases

Setup files for the Movies and Rentals databases are included with the Enterprise Objects Framework examples in:

NeXT_ROOT/NextDeveloper/Examples/EnterpriseObjects

where NeXT_ROOT is the directory in which you installed the WebObjects software. For example, on Windows NT, by default this directory is C:\NeXT.

Note: This directory is not installed on Solaris or HP-UX.

In addition to the database setup files, this directory contains examples of OpenStep applications that use Enterprise Objects Framework. For more information on these examples, see the ExampleGuide.rtfd file in the EnterpriseObjects examples directory. (On NT, use the demo application Text Edit to read the guide.)

Installing the sample databases involves the following four steps

  1. Setting up Database Accounts

    The multi-database support in Enterprise Objects Framework makes it possible for you to install the sample databases in three different configurations:

    Depending on your desired set up, use the tools available with your database server to set up one or two new user/databases. For example, on Sybase you could create a new database on your server called "Movies" and login with the user "sa". On Oracle you could create a new user with the name "Movies". On Microsoft Access, you could create a new database and corresponding data source, both named Movies. For more information on creating databases and data sources on Access, see the section "Using Microsoft Access."

    Once you have set up the database accounts, you are ready to install the examples.

  2. Copying the Example Directory

    The database installation scripts make modifications to some of the example files based on your database setup, so you should copy the example directory to a directory that you can write in.

  3. Configuring the Example Models

    The model files used by the examples must be configured to use your database and its adaptor. To configure the model files, simply run the configure_examples program in a command shell. (To open a shell on Windows NT, choose Bourne Shell in the WebObjects program group.) cd to your copy of the examples directory, and run configure_examples. It asks you for the name of the adaptor you want to use (Informix, ODBC, Oracle, or Sybase) and for the login information for your database. With the correct login information, it modifies the example models to work with your server.

    If you're using Access, choose the ODBC adaptor. You'll have to provide the name of your database's data source. Also, when configure_examples asks for a user name and password, simply press Return; these fields are unnecessary for Access.

  4. Populating the Databases

    To fill your example databases with sample data, use the install_database program. in the DatabaseSetUp directory. In your command shell, cd to the DatabaseSetUp directory, and run install_database. It connects to your databases, adds the example tables, and fills them with data. If you later wish to remove the data, run the drop_database program.

Table of Contents Next Section