COMP3311 Week 1 Monday Lecture
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [0/21]
COMP3311 25T1
Database Systems
https://webcms3.cse.unsw.edu.au/COMP3311/25T1/
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [1/21]
| |
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]
| |
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]
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:
- Topic Videos ... primary content
- Lectures ... summary content + examples
- textbooks ... most detailed version of topics
Activities:
- lectures ... work though examples, ask questions
- tutorials ... work through exercises, ask questions
- prac exercises ... learn the systems and skills
- assignments ... practice your skills
- exam ... demonstrate your knowledge/skills
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [5/21]
Echo360 records the lecture; I also record the lecture.
After the lecture, Echo360 processing takes ~1.5 hours
After the lecture ...
- I do some post-processing (~1 hour)
- I upload to YouTube (~1 hour)
- I link it to the web site (when I remember)
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/
- Home: where Notices and Upcomings appear
- Course Outline: the "contract"
- Timetable: info on tutors and locations for tutorials
- Topic Videos: short-form (20-40 mins), topic based videos
- Lectures: slides, videos and exercise solutions
- Assignments: assignment specs and other material
- Tutorials : questions and, eventually, answers
- Prac Work : lab-like practical exercises
- Activities: quizzes and polls
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [7/21]
You run you own PostgreSQL server on the host vxdb02
How to access the vxdb02
server
- from Vlab:
ssh vxdb02
- from Home:
ssh YourUserName@vxdb02.cse.unsw.edu.au
On the
vxdb02
server you have
- your standard CSE directories
- a special directory
/localstorage/YourUserName/
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]
Aims of data modelling:
- describe what information is contained in the database
(e.g., entities: students, courses, accounts, branches, patients, ...)
- describe relationships between data items
(e.g., John is enrolled in COMP3311, Tom's account is held at Coogee)
- describe constraints on data
(e.g., 7-digit IDs, students can enrol in no more than 3 courses per term)
Data modelling is a design process
- converts requirements into a data model
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [10/21]
Consider the following while working through exercises:
- start simple ... evolve design as problem better understood
- identify objects (and their properties), then relationships
- most designs involve kinds (classes) of people
- keywords in requirements suggest data/relationships
(rule-of-thumb: nouns → data, verbs → relationships)
- don't confuse operations with relationships
(operation: he buys a book; relationship: the book is owned by him)
- consider all possible data, not just what is available
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:
- the data items involved (objects and their attributes)
- relationships between these data items
- constraints on the data and relationships
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:
- the data items involved (objects and their attributes)
- relationships between these data items
- constraints on the data and relationships
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:
- the data items involved (objects and their attributes)
- relationships between these data items
- constraints on the data and relationships
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:
- attribute:
data item describing a property of interest
- entity:
collection of attributes describing object of interest
- relationship:
association between entities (objects)
ER diagram: modelling notation containing collections of
- entities (rectangles) and their associated attributes (ovals)
- relationships (diamonds) between entities (1:1, 1:n, n:m, total, partial)
- keys: sets of attributes that uniquely define entities
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:
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [16/21]
❖ Entity-Relationship Data Modelling (cont) | |
ER design elements:
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [17/21]
❖ Entity-Relationship Data Modelling (cont) | |
Example of attribute notations:
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [18/21]
❖ Entity-Relationship Data Modelling (cont) | |
Relationships:
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:
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [20/21]
Using the ER diagram below
- give examples of entity values
- describe the semantics of the relationships
COMP3311 25T1 ♢ Week 1 Monday Lecture ♢ [21/21]
Produced: 19 Feb 2025