Theory and Practice of Relational Databases
by Stefan Stanczyk, Bob Champion and Richard Leyton
 

Examples and Downloads


Welcome

Book overview

Book preface

Book Chapters

Software downloads

Ordering

References

Online resources

Book errata

Authors

Copyright

Chapter 5 and Chapter 11 contain examples relating to different database software. Rather than labouriosly type out these yourself, and battle through any ensuing problems, we've put things together for you to download - as well as provide links to additional software that may be needed.

We have also provided some notes and suggestions to help you on your way. If you continue to have trouble, a forum has been created on SourceForge where you can post questions and discuss issues with other readers.

IMPORTANT


Disclaimer: The authors are not responsible for the content of external sites referenced here, they are the sole responsibility of their respective owners. Software downloaded from these sites are covered by different licenses. Ensure that you read and understand them before you use them. When installing software on a computer, ensure that you are following the rules and regulations in place at that site. The authors cannot accept responsibility for any problems or issues caused through installing software referenced here or in the text.

Help and assistance with the software: Where possible, please try and find help and assistance locally to you. The authors receive a lot of e-mail each day, and whilst we do try to help where we can, we can't necessarily help in specific issues relating to the software included here.


Chapter 5 - LEAP

This chapter introduced LEAP - an educationally oriented DBMS which provides a working example of the relational algebra which was covered in depth in chapter 4.
Software
Examples
Notes
Installing the examples in the current version of LEAP is straightforward, simply follow the instructions in the next paragraph. However, if you're installing the examples into an earlier version of LEAP (1.2.5.2 or below), copy the .src file from above into one of the existing database source directories (eg. LEAPDIR/database/user/scripts), and execute it with the command: "@ install.src", or copy it over the existing install.src in the "LEAPDIR/scripts" directory and run "make install"- but be aware this will erase existing databases and their contents!

LEAP is easy to install from scratch in most environments, either from a distributed zip file (no administrator rights should be needed for Windows NT users), or from source in Un*x environments, just run "configure" in the source (src) directory, and compile with "make". Windows users should execute the "install.bat" file located in the "bin" directory.

Windows users who wish to compile LEAP for themselves should take a look at the Cygwin project, which provides a Unix API under Windows. This is used by the author to compile LEAP in the Windows environment. The Windows GUI was developed by Curt Hill to make for a more pleasing interface to CLI averse users.

Chapter 11 - Case Study

Software

Examples

  • A single file is available here which contains each of the examples given in the chapter. You'll need Winzip, or Unix tar/gunzip to extract the files. It includes guidelines about getting the examples working (Summarised below). It's distributed under the terms of the GNU General Public License.
  • New! If you just want to see the scripts in action, then we've put together five sample instances for you to experiment with. 1, 2, 3, 4, 5. Note that the databases are rebuilt every few hours.
  • Your attention is drawn to the README and INSTALL files contained in the download. They contain notes on the installation process, and are summarised below.

Notes and Suggestions regarding Installing and running the software

Apache webserver

The installation of your webserver will depend very much on the particular environment you are running in. For example, in a University or College environment, you may find that you need to use the "public_html" system, and place files in your home directory. Alternatively, you may have access to a home machine running Linux, in which case you can configure it how you like.

The best advice that we can give is that you approach staff, or consult local documentation where available. Apache can be setup in a user environment on a tightly controlled unix environment, but at high port numbers.

MySQL

MySQL is a more complicated program to install, as it will require root permissions to install in most situations. RPM's or other package formats will make for the easiest installation process (and they exist for most platforms), but source installations can be installed in arbitrary locations, but will possibly require additional software. Again, consult local staff or documentation for it's availability.

It might make more sense to consider using an alternative DBMS that is available to you as part of your course. Many technical departments will perhaps have an Oracle, Sybase or alternative DBMS available to students. Download and install the appropriate DBD modules to your perl installation, and adapt the code appropriately.

Perl

Perl has, at long last, become an almost standard inclusion in Un*x distributions. Sun have finally bowed to pressure and included it in Solaris 8. However, whilst perl may well be installed, you should check that the modules are appropriately configured. the "perldoc perllocal" command will reveal which modules have been installed. Install, or request that the appropriate versions of DBD (and a recent version of DBI!) are installed for your environment.

You might wish to consult the DBI pages on perldoc for more information.