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

These notes describe the environment available to you in this exam. Reading them carefully could potentially save you much time in completing the 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
music.dump An PostgreSQL dump of database about music 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.sql Template for PLpgSQL function for Question 5 (prac)
q6/q6 Template Python script for Question 6 (prac)
q6/q6.sql Template file for any helper SQL code for Question 6 (prac)
q7/q7 Template Python script for Question 7 (prac)
q7/q7.sql Template file for any helper SQL code for Question 7 (prac)
q8.txt Template for ER diagrams in Question 8 (written)
q9.txt Template for ??? in Question 9 (written)
q10.txt Template for ??? in Question 10 (written)
q11.txt Template for ??? in Question 11 (written)
q12.txt Template for transactions in Question 12 (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 files:

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