COMP3311 Week 1 Monday Lecture

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [0/19]

COMP3311 23T3
Database Systems

[Diagram:Pics/intro/pgsql.jpg]


https://webcms3.cse.unsw.edu.au/COMP3311/23T3/
COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [1/19]
❖ Lecturer

   

Name:John Shepherd
Email:cs3311@cse.unsw.edu.au
Consults:Times: TBA,  Place: CSE Help!
Roles:Convenor, COMP3311 23T3
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 23T3 ♢ Week 1 Monday Lecture ♢ [2/19]
❖ Course Admin

   

Name:Dylan Brotherston
Email:cs3311@cse.unsw.edu.au
Roles:COMP3311 23T3 Admin
COMP1521 23T3 Admin



Despite the picture, Dylan is not a bat

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [3/19]
❖ Tutors

Many, many students  ⇒  many tutors ...

  • Brianna Kim
  • Calley Chai
  • Carly Lim
  • Dylan Brotherston
  • Evan Krul
  • Kenneth Li
  • Kyu-Sang Kim
   
  • Manhua Lu
  • Max Xue
  • Ronan Davis
  • Sai Nair
  • William Feng
  • Xinzhang Chen
  • Yun Li
COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [4/19]
❖ How COMP3311 23T3 will run

Sources of information:

Activities:
COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [5/19]
❖ How COMP3311 23T3 will run (cont)

Classes:


Note on lecture enrolments: Not everyone can attend live: CLB7 holds ~450, Class is ~700
COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [6/19]
❖ Know your course website

Access via https://webcms3.cse.unsw.edu.au/COMP3311/23T3/

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [7/19]
❖ Your DB Server

You run you own PostgreSQL server on the host nw-syd-vxdb2

How to access the vxdb2 server

On the vxdb2 server you have

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

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [8/19]
❖ Exercise: Play with vxdb2


Login to vxdb2

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 02.

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [9/19]
❖ Data Modelling

Aims of data modelling:

Data modelling is a design process

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [10/19]
❖ Some Design Ideas

Consider the following while working through exercises:

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [11/19]
❖ Exercise: Course Outline Data Model


Imagine that we wanted a database of course outlines.

Work out requirements by looking at real course outlines.

Develop an informal data model for it by identifying:

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [12/19]
❖ Exercise: Instagram Data Model


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

Develop an informal data model for it by identifying:

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [13/19]
❖ Exercise: GMail Data Model


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

Develop an informal data model for it by identifying:

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [14/19]
❖ Entity-Relationship Data Modelling


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

ER has three major modelling constructs:

The ER model is not a standard, so notational variations exist

Lecture notes use notation from SKS and GUW books (simple)

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [15/19]
❖ Entity-Relationship (ER) Diagrams

ER diagrams are a graphical tool for data modelling.

An ER diagram consists of:

Terminology abuse: Key = set of attributes that uniquely identifies each entity instance
COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [16/19]
❖ Entity-Relationship (ER) Diagrams (cont)

Example ER diagram:


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

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [17/19]
❖ Entity-Relationship (ER) Diagrams (cont)

Example of attribute notations:

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

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [18/19]
❖ Exercise: Relationship Semantics

Describe precisely the semantics of the following relationships:

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

COMP3311 23T3 ♢ Week 1 Monday Lecture ♢ [19/19]


Produced: 22 Nov 2023