COMP3311 Week 1 Monday Lecture

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [0/21]

COMP3311 25T1
Database Systems

[Diagram:Pics/intro/pgsql.jpg]


https://webcms3.cse.unsw.edu.au/COMP3311/25T1/
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [1/21]
❖ Lecturer

   

Name:John Shepherd
Email:cs3311@cse.unsw.edu.au
Consults:by email,   Use: CSE Help!
Roles:Convenor, COMP3311 25T1
Deputy Head of School (edu)
Research: Information Extraction
Information Retrieval
e-Learning Technologies
Multimedia Databases
Extras:AFL,  GABS,  HP,  IPA,  KD

What to call me?   jas,   John,   Dr Shepherd,    HRH,   Your Majesty

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [2/21]
❖ Course Admin

   

Name:Dylan Brotherston
Email:cs3311@cse.unsw.edu.au
Roles:COMP3311 25T1 Admin
Systems Support Extraordinaire



Despite the picture, Dylan is not a bat

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [3/21]
❖ Tutors

Many, many students  ⇒  many tutors ...

  • Abbie Worswick
  • Alex Lee
  • Ayda Orang
  • Edward Qian
  • Evan Krul
  • Hellen Wang
  • Henry Li
   
  • Justin Liu
  • Kenneth Li
  • Matthew Perry
  • Neil Dadhich
  • Sai Nair
  • Sooyoung Moon
  • Xinzhang Chen
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [4/21]
❖ How COMP3311 25T1 will run

Sources of information:

Activities:
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [5/21]
❖ Lecture Videos


Echo360 records the lecture; I also record the lecture.

After the lecture, Echo360 processing takes ~1.5 hours

After the lecture ...


I do not monetize the YouTube videos; any ads are courtesy of Google.
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [6/21]
❖ Know your course website

Access via https://webcms3.cse.unsw.edu.au/COMP3311/25T1/

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [7/21]
❖ Your DB Server

You run you own PostgreSQL server on the host vxdb02

How to access the vxdb02 server

On the vxdb02 server you have

The only software you should run on vxdb02 is PostgreSQL  (no vscode)

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [8/21]
❖ Exercise: Play with vxdb02


Login to vxdb02

Find your /localstorage directory

Set up your environment

Install your PostgreSQL server

Explore the files in your PostgreSQL server


More details on doing this are in Prac Exercise 01.

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [9/21]
❖ Data Modelling

Aims of data modelling:

Data modelling is a design process

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [10/21]
❖ Some Design Ideas

Consider the following while working through exercises:

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [11/21]
❖ Exercise: Instagram Data Model


Consider Instagram (photos, videos, viewers, posters, ...)

Develop an informal data model for it by identifying:

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [12/21]
❖ Exercise: GMail Data Model


Consider the GMail system (or any other modern mail client)

Develop an informal data model for it by identifying:

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [13/21]
❖ Exercise: Handbook Data Model


Imagine that we wanted a database for the UNSW Handbook

Work out requirements by looking at the actual Handbook

Develop an informal data model for it by identifying:

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [14/21]
❖ Entity-Relationship Data Modelling

The world is viewed as a collection of inter-related entities.

ER has three major modelling constructs:

ER diagram: modelling notation containing collections of Lecture notes use notation from SKS and GUW books (simple)
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [15/21]
❖ Entity-Relationship Data Modelling (cont)

Example ER diagram:


[Diagram:Pics/er-rel/er1.png]

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [16/21]
❖ Entity-Relationship Data Modelling (cont)

ER design elements:

[Diagram:Pics/er-rel/er-symbols.png]

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [17/21]
❖ Entity-Relationship Data Modelling (cont)

Example of attribute notations:

[Diagram:Pics/er-rel/erattrs.png]

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [18/21]
❖ Entity-Relationship Data Modelling (cont)

Relationships:

[Diagram:Pics/er-rel/cardExs.png]


Thick line = total participation;   thin line = partial participation

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [19/21]
❖ Exercise: Relationship Semantics

Describe precisely the semantics of the following relationships:

[Diagram:Pics/exercises/example-rel.png]

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [20/21]
❖ Exercise: ER Diagram

Using the ER diagram below

[Diagram:Pics/er-rel/ER-summary.png]

COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [21/21]


Produced: 19 Feb 2025