COMP3311 Week 1 Tuesday Lecture

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [0/22]

COMP3311 23T1
Database Systems

[Diagram:Pics/intro/pgsql.jpg]


https://webcms3.cse.unsw.edu.au/COMP3311/23T1/
COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [1/22]
❖ Lecturer

   

Name:John Shepherd
Email:cs3311@cse.unsw.edu.au
Consults:TBA
Roles:Convenor, COMP3311 23T1
Deputy Head of School (edu)
Research: Information Extraction
Information Retrieval
e-Learning Technologies
Multimedia Databases
Extras:GABS,  AFL,  KD,  NW

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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [2/22]
❖ Course Admin

   

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

Despite the picture, Dylan is not a bat

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [3/22]
❖ Tutors

Many, many students  ⇒  many tutors ...

  • Carly Lim
  • Dylan Brotherston
  • Evan Krul
  • Jason Gong
  • Kyu-sang Kim
  • Manhua Lu
   
  • Max Xue
  • Minyi Zhong
  • Ronan Davis
  • Shirley Zhou
  • William Feng
  • Yifan He
COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [4/22]
❖ How COMP3311 23T1 will run

Sources of information:

Activities:
COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [5/22]
❖ How COMP3311 23T1 will run (cont)

Classes:


Note on lecture enrolments: Not everyone can attend live: CLB6 holds ~200, Class is ~600
COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [6/22]
❖ Know your course website

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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [7/22]
❖ Software

Software versions that we'll be running this semester (TBC):

If you install them at home: Alternative to installing at home:
COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [8/22]
❖ Software (cont)

How to access the vxdb2 server

On the vxdb2 server you have The actual hostname of the vxdb2 server is nw-syd-vxdb2

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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [9/22]
❖ 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 23T1 ♢ Week 1 Tuesday Lecture ♢ [10/22]
❖ Data Modelling

Aims of data modelling:

Data modelling is a design process

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [11/22]
❖ Some Design Ideas

Consider the following while working through exercises:

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [12/22]
❖ Exercise: Course Outline Data Model


Imagine that we wante a database of course outlines.

Work out requirements by looking at real course outlines.

Develop an informal data model for it by identifying:

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [13/22]
❖ Exercise: Instagram Data Model


Consider Instagram (photos, videos, viewers)

Develop an informal data model for it by identifying:

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [14/22]
❖ Exercise: GMail Data Model


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

Develop an informal data model for it by identifying:

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [15/22]
❖ 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 23T1 ♢ Week 1 Tuesday Lecture ♢ [16/22]
❖ 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 23T1 ♢ Week 1 Tuesday Lecture ♢ [17/22]
❖ Entity-Relationship (ER) Diagrams (cont)

Example ER diagram:


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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [18/22]
❖ Entity-Relationship (ER) Diagrams (cont)

Example of attribute notations:

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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [19/22]
❖ Exercise: Relationship Semantics

Describe precisely the semantics of the following relationships:

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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [20/22]
❖ Exercise: ER Diagram

Using the ER diagram below

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

COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [21/22]
❖ Exercise: ER Models


For each of the informal data models

give a suitable ER diagram
COMP3311 23T1 ♢ Week 1 Tuesday Lecture ♢ [22/22]


Produced: 14 Feb 2023