Notices

  • Prac 04, 05 Videos Out

    Posted by Jerry He Monday 16 March 2026, 10:56:50 AM.

    Hi all,

    Prac 04 and Prac 05 videos are out:

    https://www.youtube.com/watch?v=8F-gkSwiYbE&list=PLRalM05yyRqUQu81nFdV2JY4sfqa-gkfm&index=2

    https://www.youtube.com/watch?v=VDUheECb_xU&list=PLRalM05yyRqUQu81nFdV2JY4sfqa-gkfm&index=1

    Hope these help you.

    3311 Team

  • Some Clarifications from Week 04 Lectures

    Posted by Jerry He Friday 13 March 2026, 11:16:41 PM.

    Hi everyone,

    Please note that Week 4 Monday and Thursday demonstration scripts are located in:

    /import/adams/A/cs3311/web/26T1/lectures/week04-monday/sql/

    /import/adams/A/cs3311/web/26T1/lectures/week04-thursday/sql/

    We got some interesting questions from lectures this week:

    1. Why RETURN NEW in an AFTER trigger?

    Even though an AFTER INSERT trigger cannot modify the row being inserted (because the operation is already complete), PostgreSQL still requires a RETURN statement.

    • In PL/pgSQL, the trigger function must return a record to satisfy the system's requirements.
    • Returning NEW is essentially a standard "handshake" to the database to indicate that the trigger has executed successfully without blocking the operation. It is syntax plumbing , not an indication that you are modifying the data being inserted.

    2. Dropping overloaded functions

    If you have multiple functions named seq() with different signatures (parameters), PostgreSQL treats each as a unique entity.

    • Will it drop all of them? No.
    • How to drop a specific one: You must specify the signature. If you only type DROP FUNCTION seq();, the database will error because it doesn't know which version you mean.
    • To delete a specific version, include the argument types, for example:
      • DROP FUNCTION seq(int);
      • DROP FUNCTION seq(int, int);

    3. Why our user defined mycount(*) fail.

    Consider the following user defined aggregate:

    create or replace function mycount_trans(state integer, val anyelement)

    returns integer

    as $$

    begin

    return state + 1;

    end;

    $$ language plpgsql;

    create aggregate mycount(anyelement) (

    sfunc = mycount_trans,

    stype = integer,

    initcond = '0'

    );

    You will notice that the following code works:

    SELECT bar, mycount(bar) FROM sells GROUP BY bar;

    However, the following code does not work.

    SELECT bar, mycount(*) FROM sells GROUP BY bar;

    This is because, the * symbol is a special token that represents "all columns of the table. The built-in count(*) is a hardcoded exception in the database engine that knows how to count rows without needing a specific column. Our user defined aggregate my count did not implement this exception.

    Have a good weekend! Let's have more discussions like this in class.

    COMP3311 Team

  • Assignments 1 autotest release

    Posted by Wenqian Zhang Friday 13 March 2026, 05:01:34 PM.

    The autotest for Assignment 1 has been released. You can use the following command to test your work: 3311 autotest ass1

  • Week 4 and 5 Help Sessions

    Posted by Kenneth Li Monday 09 March 2026, 04:53:18 PM, last modified Friday 13 March 2026, 11:05:00 PM.

    Reminder that help sessions for Assignment 1 are available in Weeks 4 and 5, with the first one being tomorrow. Please check the times and locations for these sessions in the "Help Sessions" section on the WebCMS sidebar.

    Week 4 Thursday Edit: Help session room change to Mathews 226.

    Week 4 Tuesday Edit: To access the Level 3 Matthews rooms, you will have to use the lifts as the stairs won't work. A lift is located around here with the red circle.



  • ​Assignment 1 Forum Question Guidelines

    Posted by Kaiyu Chen Monday 09 March 2026, 01:00:22 PM.

    • ass1-general : Post clarification questions about the assignment here so everyone can see the answers.
    • ass1-private : Post questions that include your code here. These topics are private and only visible to you and the course staff.

  • ​Assignment 1 Out

    Posted by Jerry He Friday 06 March 2026, 05:20:41 PM, last modified Saturday 07 March 2026, 12:46:49 PM.

    Assignment 1 is now available on WebCMS: https://cgi.cse.unsw.edu.au/~cs3311/26T1/assignments/ass1/index.html

    The due date is 9PM Friday Week05. (20 March 2025)

    3311 Team

  • Prac 03 Video Out

    Posted by Jerry He Friday 06 March 2026, 04:34:03 PM.

    Hi all,

    Prac 03 video has been made and relased:

    https://www.youtube.com/watch?v=pKa52Qxcwzk

    Jerry

  • Week 3 Monday & Thursday SQL Files

    Posted by Jerry He Thursday 05 March 2026, 07:59:10 PM, last modified Thursday 05 March 2026, 08:04:17 PM.

    Hi all,

    You may use the following command to copy the demonstrated SQL files to your current directory within VXDB02.

    Week 3 monday:

    cp /import/adams/A/cs3311/web/26T1/lectures/week03-monday/sql/*.sql .

    Week 3 Thursday:

    cp /import/adams/A/cs3311/web/26T1/lectures/week03-thursday/sql/*.sql .

    Best,

    Jerry

  • About Quiz one

    Posted by Jerry He Tuesday 03 March 2026, 04:57:09 PM.

    Hi everyone,

    We are offering another chance to take Quiz 1 for those who missed it. This is a different quiz. We understand students might miss it because they could not have access to course materials in the early stage.

    https://webcms3.cse.unsw.edu.au/COMP3311/26T1/activities/quizzes/2464

    (If you took old quiz one and still want to take this, no problem. We will take maximum mark of the two.)

    For the remaining quizes, please remember to take them. They are due at Friday midnight,

    Best,

    Jerry

  • Week 02 lecture Remade

    Posted by Jerry He Friday 27 February 2026, 11:51:55 AM.

    Hi everyone,

    Due to a tech issue, our lecture recording of week 2 thursday is without audio. I have contacted tech support to address this issue ASAP.

    For students in online strean, I have made a new video in replacement :

    https://www.youtube.com/watch?v=TFBamAUDJJI

    The SQL files in the demonstration can be found in: /import/adams/A/cs3311/web/26T1/lectures/week02-thursday/sql/

    best,

    Jerry


  • Prac 02 Video Out

    Posted by Jerry He Monday 23 February 2026, 06:06:09 PM.

    Hi everyone,

    I made a video about prac 02:

    https://www.youtube.com/watch?v=0T-_85yLIV4&list=PLRalM05yyRqUQu81nFdV2JY4sfqa-gkfm

    Best,

    Jerry

  • Week 1 Thursday Recording & Echo360 Activation for Live Lectures

    Posted by Jerry He Friday 20 February 2026, 11:53:02 AM, last modified Friday 20 February 2026, 11:55:33 AM.

    Hi Everyone,

    The recording for the Week 1 Thursday lecture is now available on both Echo360 and Youtube .

    Action Required: Activate Echo360 for Week 02 Live Streams

    The University Tech team has finalized the setup for our Live Lectures starting next week. To ensure you have access, please "activate" your account by clicking the Echo360 link via one of our official platforms:

    • Primary: Webcms
    • Alternative: Moodle (under "Lecture Recordings")

    You should be able to see a list of 17 arranged lectures, two of which are already completed.

    Accessing the platform through these links confirms your UNSW identity and marks you as "Activated" on my end. Please do this before next week to avoid login issues during the live stream.

    Have a great weekend!

    Best,

    Jerry

  • Prac01 Video Available

    Posted by Jerry He Tuesday 17 February 2026, 05:11:35 PM.

    Hi everyone,

    To better assist you with the vxdb02 environment, I made a video about prac01:

    https://www.youtube.com/watch?v=mMsvWMlgoCQ

    Best,

    Jerry

  • Welcome to COMP3311 2026 T1

    Posted by Jerry He Monday 16 February 2026, 01:51:11 AM.

    Hi Everyone,

    Welcome to the Term 1 offering of COMP3311 in 2026.

    I am Jerry, the lecturer of this term.

    Our Course Webpage is avalible in WebCMS3: https://webcms3.cse.unsw.edu.au/COMP3311/26T1/
    Here you will find links to all the course material.

    Moodle will only be used to access Online Help Sessions (starting week 4) and lecture recordings in Echo360.

    Our first lecture is today (Monday) from 1PM to 3PM in Physics Theatre (K14).
    https://www.learningenvironments.unsw.edu.au/physical-spaces/k-k14/k-k14-19

    The recording will be avalible in Echo afterweards.

    From week02 onward lectures will be viewable live in echo360, but this takes time for IT to setup so will not be avalible for the first lecture.

    We also have lectures on Thursdays from 2PM to 4PM in Physics Theatre (K14).

    Students in the online lecture stream are welcome to attend in-person lectures if there is room in the theatre which there usually is after week 1

    COMP3311 runs 1.5 hour Tutorals starting week02 ( NOT THIS WEEK ).
    We have a fantasic team of tutors who will be teaching tutorials this term.
    We have 4 online tutorials this ter, which will be recorded.

    COMP3311 will be using DIscourse as our course forum, infomation on how to access Discourse is avalible on the course website:
    https://webcms3.cse.unsw.edu.au/COMP3311/26T1/resources/116933

    If you have a personal or private issue, please email the course email alias <cs3311@cse.unsw.edu.au>.

    Looking forward to seeing you guys today!

    Jerry

    COMP3311 Lecturer


Back to top

COMP3311 26T1 (Database Systems) is powered by WebCMS3
CRICOS Provider No. 00098G