Database Management Systems

by Raghu Ramakrishnan and Johannes Gehrke

Database Management Systems (3rd Edition) ] WWW Resources ] Material for the Third Edition ] Material for the First Edition ] Material for the Second Edition ]

Installing the Exercises

Sample test data and tables for the exercises at the end of Chapter 5 (on SQL) are available. With this data you may conveniently use Oracle to experiment with these problems. Scripts have been included to automatically create the tables and bulk load the provided data for you on both Windows and Unix. After the data has been loaded, you may add your own data or change what was provided as much as you like.

Make sure you have Oracle installed and configured correctly on your computer before proceeding.

Windows System

On a Windows system use the following procedures:

  1. Download the file dbbook_exercise.zip.
  2. Extract dbbook_exercise.zip to a temporary directory.
  3. Go to the temporary directory and double click on bookinst.vbs.
  4. Enter your Oracle database username and password in the form provided.
  5. Click Install.

[Note that you must have the Windows Scripting Host 5.6 installed and enabled for this to work. If you have Internet Explorer 6.0 or above installed, it should have been installed by default. Otherwise, you can download WSH 5.6 here.

If your Windows scripting is disabled, either temporarily enable scripting, or you may run the exercise_data\dbbook.sql script (located in the directory you extract the files to) in SQL*Plus and bulk load the data files in exercise_data manually with the sqlldr program and provided control files.]

Unix System

On a Unix system use the following procedures:

  1. Download the file dbbook_exercise-unix.zip to your Unix account.
  2. Type unzip dbbook_exercise-unix.zip
  3. Type bookinst
  4. Follow the prompts for your username and password. Be sure to enter any connection string with your username as when using SQL*Plus.

[Note that you may use the windows installation script if you copy the entry from the $ORACLE_HOME/network/admin/tnsname.ora file on the Unix system to thetnsname.ora file on Windows and use the appropriate connect string. ]

Notes:

  • Note that we made some changes to the sample tables: In the STUDENT table, the column name "level" was changed to "standing" because "level" is a keyword in oracle. In the FLIGHTS table, the column names "from" and "to" were changed to "origin" and "destination" because they are keywords in oracle. Oracle vs. SQL.
  • Oracle uses SQL command "MINUS" instead of "EXCEPT" for the set-difference operator. Oracle does not support SQL keyword "AS" in the FROM clause.

 


Version 0.1.0.0 Last Updated: 2002/04/14 by David Warden
Oracle is a registered trademark of Oracle Corporation. Windows is a trademark of Microsoft Corporation. Unix is a trademark of The Open Group.
Copyright (C) 2002 McGraw-Hill Companies Inc. All Rights Reserved.