CSCC43: Introduction to Databases
Summer 2009


Course Resources

Latex   |   PostgreSQL   |  JDBC   |  XML Editors

Latex

  • A LaTeX plugin for Eclipse, suggested by David Warde-Farley.

  • The MikTeX Project.

  • The TeXShop Project, for Mac, suggested by David Warde-Farley.

  • Here is an example of a LaTeX file, which emphasizes on editing equations. You'll need this extensively for editing the first assignment.
    • To compile this file, use latex file.tex. The result of this compilation is file.dvi. To view a .dvi file, you can use xdvi.

    • Use dvips -Ppdf file.dvi to convert the .dvi file to a .ps one. Note that the -Ppdf is optional, but it's useful when you don't want an ugly .pdf file! (Try it without it and see the difference.)

    • Use ps2pdf file.ps to convert the .ps file to a .pdf one.

[Top]


PostgreSQL

Run PostgreSQL in Bladen Computer Labs

The PostgreSQL database system, version 8.2.5, is installed in the MathLab Cluster. The path to it is /usr/postgresql/postgresql. Your professor will provide you three fields required to access the PostgreSQL: database name, database username, and the password. Note that only local database connections are enabled to the PostgreSQL, which means you have to login to this compute node in order to interface with the database.

Connect to the Database
  1. Login to the server that hosts PostgreSQL
       ssh <UTSC_ID>@mathlab.utsc.utoronto.ca
      
  1. Interface with the PostgreSQL
To interface with the PostgreSQL server(s), use the psql command. For example, run one the following commands:
  • Interactive mode: psql -U <database_username>
                This will give you an interactive shell to type in SQL queries.
  • Batch mode: psql -U <database_username> < <file>
                where <file> is a file containing your SQL queries.
                An example is: psql -U huangtest < test1.sql

You can check out PostgreSQL documentation in the man page ( man psql ), and/or at http://www.postgresql.org/docs/8.2/interactive/index.html

[Top]

Run PostgreSQL on your home computer

Downloads, documentation, discussions and much more can be found at the PostgreSQL home page.

If you are running into trouble installing PostgreSQL on your home machines, your TA is there to help you. You may also want to exchange ideas with other students and make extensive use of Google and documentation available at PostgreSQL.

Download

PostgreSQL Documentation

Installation

EBooks

[Top]


JDBC

Resources on UTSC - Bladen MathLab Cluster
  • If you want to use Java to interface with the PostgreSQL, you need to incorporate the JDBC driver already installed on node3201.
    • The path for the driver is /usr/postgresql/postgresql/share/postgresql.jar.
    • There are also example java files along with the readme which explain how to run it:
      • /usr/postgresql/postgresql/share/HelloPostgresql.java
      • /usr/postgresql/postgresql/share/HelloPostgresql.ReadMe

Resources at PostgresSQL.org

[Top]


XML Editors

You are not required to use an XML editor in this course (for assignment 3 in particular). But for anyone who wants to debug and run your XPath and XQuery expressions, here are some suggestions:

[Top]