COMP3311 Final Exam 21T3 The University of New South Wales
COMP3311 Database Systems
Final Exam 21T3
Database Systems
[Front Page] [Notes] [Database] [Course Website] [Cheat Sheets]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9] [Q10]

These notes describe the environment available to you in this exam. Reading them carefully could potentially save you much time in completing the questions.

We will be testing your prac questions as follows:

An important implication of this testing strategy is that any helper views/functions that you define in one question wiil be available in all subsequent questions. You do not need to redefine them in each file. Ensure that you put definitions into your files so that the above testing strategy works correctly. If you want to use SQL views and functions in your q5 script, they will need to be defined in the previous questions.

When you unzip the exam-work.zip file, the following files will be copied to your working directory:

File Contents
check A shell script to do the testing for the prac questions
property.dump An PostgreSQL dump of database about property for use in the prac questions
q1/q1.sql SQL view template for Question 1 (prac)
q2/q2.sql SQL view template for Question 2 (prac)
q3/q3.sql SQL view template for Question 3 (prac)
q4/q4.sql Template for PlpgSQL function for Question 4 (prac)
q5/q5 Template Python script for Question 5 (prac)
q6.txt Template for ??? in Question 6 (written)
q7.txt Template for ??? in Question 7 (written)
q8.txt Template for ??? in Question 8 (written)
q9.txt Template for ??? in Question 9 (written)
q10.txt Template for ??? in Question 10 (written)

The qX.sql, qX (Python scripts) and qX.txt are provided to save you some typing. Files with a sql suffix are part of the practical component of this exam and you should test that the code in them works before submitting. Similary for the Python scripts in Q6 and Q7. Files with a .txt suffix are part of the written component of the exam, and, even if they contain code, do not require testing before submission. Of course, you should read them carefully before submitting.

Each prac question has its own directory, and each of these contains, along with the template file:

File Contents
tests/ A directory containing test cases for your view/function/script
check A shell script to run the tests
tests/*.sh Small scripts to run each test
tests/*.expected Expected outputs for each of the tests

Note that each of the tests directories contains an empty file called 00.expected. Do not remove this file.

If you accidentally remove any of the above files, you can get a fresh copy via the command:

unzip exam-work.zip fileName

This command will ask before overwriting any existing copy of a file called fileName.

The check script will create other files in the tests directory when it runs its tests. You can examine these to help with debugging.

End of Notes