Relational Databases and Web Integration

This is the module web page for Relational Databases and Web Integration (see module specification).

All teaching material written by myself (ie. Dr. Carl Pulley) is placed within this site's resource blog. By subscribing to this blog, you get to see when new material has been released or updated. My teaching materials may also be accessed by clicking on the relevant teaching week link under Teaching Materials on this page's sidebar.

Software Requirements

We will be primarily operating within an Ubuntu environment. All files will be edited with simple text editors such as vi, scitex or gedit. The UNIX command line will be used a lot here!

For the PHP teaching, we will use the PHP/MySQL server as setup on the helios web server. Access to this server will be via sftp and phpMyAdmin.

Detailed Ruby on Rails Installation Instructions

Here we shall assume that you are using an Ubuntu operating system - no other OS shall be supported on this course! Note: within a Windows environment try using Wubi.

There are two ways in which you may build a usable Rails environment:

Quick Installation Instructions

Since these instructions are altering the installed system packages, you will need to use root privileges via sudo here:

  • Install the key Ubuntu packages with:
    sudo apt-get install rails gitk subversion ruby1.8-dev
  • Setup our gem sources with:
    sudo gem sources -a http://gems.github.com
    and: sudo gem sources -a http://gems.rubyforge.org
  • Install various useful gems with:
    sudo gem install ruby-debug
    and: sudo gem install nifty-generators formtastic wirble hirb

Recommended Installation Instructions

Since these instructions build a local user-based Ruby on Rails setup, minimal use of root privileges are required here (ie. most of these instructions do not use sudo!):

  • Install the key Ubuntu packages with:
    sudo apt-get install sqlite3 gitk subversion
  • Install RVM with:
    mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/
    git clone git://github.com/wayneeseguin/rvm.git
    cd rvm && ./install
    Note: following the install command, ensure that you follow the instructions for modifying ~/.bashrc, otherwise your PATH environment variable will not be setup correctly.
  • Ensure that rvm may be found by executing:
    source ~/.rvm/scripts/rvm
  • Setup our gem sources with:
    gem sources -a http://gems.github.com
    and: gem sources -a http://gems.rubyforge.org
  • Install a pristine version of Ruby 1.8.7 with:
    rvm install 1.8.7
  • Install the core Ruby on Rails gem with:
    gem install rails
  • Install various useful gems with:
    gem install ruby-debug sqlite3-ruby
    and: gem install nifty-generators formtastic wirble hirb
  • Next, let's save this gem environment using RVM with:
    rvm gemset export cis2360.gems
  • Finally, let's use this new gem environment with:
    rvm gemset import cis2360
These instructions (along with full documentation) may be found at RVM Installation.

Assessment

This module is assessed as follows:

  • in-class test 1: this will assess your SQL knowledge
  • in-class test 2: this will assess your PHP knowledge via a multi-choice in-class test in week 17.
  • assignment: this will be an exercise in developing SQL database schemas and in developing web applications using Ruby on Rails (Note: all assignment related questions should be raised using the appropriate Blackboard forum).