UCSCBaskin School of Engineering  
General Information Events, News & Organizations Degrees & Departments Research Classes Admissions & Advising People & Jobs Administration

Lab Assignment Policies

How to submit your assignment

The project for CS 180, Spring 2004 will consist of a sequence of lab assignments involving database programming, including such tasks as create databases, populate them with data, modify data, write SQL queries. Unless otherwise specified, this lab assignment and all subsequent ones will be turned in electronically with "submit", a tool on IC machines.

Submit is accessible from your cats account. The general form of the command is like this:

submit class_name assignment_name file1_to_submit file2_to_submit

An example is like this, say we want to submit db_client.java to lab assignment 3 for cmps180 Spring class:

submit cmps180-wt.s04 lab3 db_clinet.java

For assignment names, we use the convention "lab#", e.g. the name is "lab1" for lab assignment 1. If you are late, but within 48 hours of the due time, you can still submit, but you should use "lab#-late", e.g. "lab1-late". For information on using submit, enter "submit -m" or "man submit" from the console.

Once you have submitted your assignment, you can use peek command to examine it and make sure it is correct. The syntax is peek class_name assignment_name file1.For more information about peek, enter "peek -m" or "man peek".

Late submissions

Lab assignment work must be submitted electronically by midnight at the end of the day that it is due. Programming work submitted after the deadline but before the "late deadline" -- midnight 48 hours after the deadline -- will be accepted but penalized 50%. No lab assignment work will be accepted after the late deadline.

Environment Setup

  • DB server: A Postgresql server is running at db.ic.ucsc.edu, use your CATS account to login. For off-campus users, you can use SSH clients to connect the server, telnet is not supported for security concern. SSH clients are available for most *NIX systems and for Windows platform, you can try SSH Secure Shell.
  • Set up the path: Once you login, you will have access to your CATS home directory. The basic Postgresql commands, e.g., psql, are at /home/bin. So to make life easier, you may want to add that directory to your PATH variable in the .login file (Use your favorite editor, e.g., vi, to open .login and add a line like "set path=( $path /home/bin)" at the end of that file). If you dont want to change your .login file, you need to change to /home/bin directory or append that path before any Postgresql command.
  • DB authentication: Postgresql uses a seperate authentication mechanism from UNIX authentication, so you need to obtain another password to access the DB server. When you try to use the Postgresql client, you will be asked for the password. Please contact TA for your password (specify your CATS username).

Record your session

In some lab assignments, students need to record their typescripts to submit, i.e. the commands and the results. There are several methods for creating a typescript to turn in for your programming assignments. The most primitive way is to cut and paste your terminal output and save it in a file (if you have windowing capabilities). Another method is to use the Unix command script to record the terminal interaction. The script command records everything printed on your screen. The syntax for the command is

    script [ -a ] [ filename ]

The record is written to filename. If no file name is given, the record is saved in the file typescript. The -a ooption allows you to append the session record to filename, rather than overwrite it. To end the recording, type exit or ctrl+D.

For more information about script, check out its man page by typing man script.

No backups for your work on the IC machines

CATS-Instructional Computing warns: "Although system backups are performed, YOUR STUDENTS MUST BE SURE TO PERFORM THEIR OWN BACKUPS, as I will not restore anything from my own backups except in case of emergency and/or complete system failure." PostgreSQL is not backed up, so anything you need long-term should be saved in the cats file system. Some suggestions for general management of your database application are given below.

Postgresql SQL compatibility

If you decide to test your solutions to the SQL homework assignment exercises using PostgreSQL, or experiment with running some SQL queries on your database, note that PostgreSQL's implementation of SQL may differ somewhat from the SQL standard as covered in the textbook and class. See PostgreSQL feature compatibility list from MySQL's crash-me program.

Useful Links

 

General info · News · Events · Degree Programs · Research · Classes · Admissions · Advising · People · Jobs · Administration
SOE Webmail · SOE SSH · SOE Wiki · Search · Sitemap · Contact us · Driving directions · Privacy · UCSC
© Baskin School of Engineering, University of California, Santa Cruz
1156 High St., Santa Cruz, CA 95064 · (831) 459-2158 · webmaster@soe.ucsc.edu