Relational Databases-Lecture 04 Slides-Computer Science, Slides of Relational Database Management Systems (RDBMS)

Sets, Products, Relations, Functions, Set operations and Relations, Indexed Sets, Indexed Sets, Dr Mohammad Yamin, Ms Zoe Brain, Lecture Slides, Relational Databases, Australian National University, Australia.

Typology: Slides

2011/2012

Uploaded on 03/12/2012

kyleaus
kyleaus 🇦🇺

5

(4)

12 documents

1 / 65

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Relational Databases - Comp2400 / Comp6240
Lecture 5: Sets, Products, Relations, Functions
Maths is more than numbers
The mathematical ideas that relational databases are built on.
Sets, indexed sets
Products
(a more general definition than the usual one)
Relations
Functions
This will prepare us for some relational algebra, and
normalisation, which is largely about “functional dependencies”.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41

Partial preview of the text

Download Relational Databases-Lecture 04 Slides-Computer Science and more Slides Relational Database Management Systems (RDBMS) in PDF only on Docsity!

Relational Databases - Comp2400 / Comp

Lecture 5: Sets, Products, Relations, Functions

Maths is more than numbers

The mathematical ideas that relational databases are built on.

Sets, indexed sets

Products

(a more general definition than the usual one)

Relations

Functions

This will prepare us for some relational algebra, and

normalisation, which is largely about “functional dependencies”.

a set is several things considered together as one thing

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London }

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London } { 2 , 3 , 15 , 328 } {}

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London } { 2 , 3 , 15 , 328 } {} {{ 1 }, { 1 , 2 }, { 1 , 2 , 3 }, ...}

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London } { 2 , 3 , 15 , 328 } {} {{ 1 }, { 1 , 2 }, { 1 , 2 , 3 }, ...}

2 describe its members using a property (or “constraint”)

{ the wheels on Greg’s car }

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London } { 2 , 3 , 15 , 328 } {} {{ 1 }, { 1 , 2 }, { 1 , 2 , 3 }, ...}

2 describe its members using a property (or “constraint”)

{ the wheels on Greg’s car } { students currently enrolled in Comp6240 }

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London } { 2 , 3 , 15 , 328 } {} {{ 1 }, { 1 , 2 }, { 1 , 2 , 3 }, ...}

2 describe its members using a property (or “constraint”)

{ the wheels on Greg’s car } { students currently enrolled in Comp6240 } { goldfish currently enrolled in Comp6240 } { the finite sets of integers }

a set is several things considered together as one thing

there are two ways of specifying a set:

1 list the items in it

{ Sydney , Toulouse , London } { 2 , 3 , 15 , 328 } {} {{ 1 }, { 1 , 2 }, { 1 , 2 , 3 }, ...}

2 describe its members using a property (or “constraint”)

{ the wheels on Greg’s car } { students currently enrolled in Comp6240 } { goldfish currently enrolled in Comp6240 } { the finite sets of integers }

a set’s members have no order: { 1 , 2 } = { 2 , 1 }

Set operations and relations

membership we write x ∈ { x , y , z } to say that x is in the set

Set operations and relations

membership we write x ∈ { x , y , z } to say that x is in the set

subset if every member of A is also in B we write A ⊆ B

Set operations and relations

membership we write x ∈ { x , y , z } to say that x is in the set

subset if every member of A is also in B we write A ⊆ B

equality two sets are equal if they have the same members

union we write A ∪ B for the set containing everything in

A and everything in B

Set operations and relations

membership we write x ∈ { x , y , z } to say that x is in the set

subset if every member of A is also in B we write A ⊆ B

equality two sets are equal if they have the same members

union we write A ∪ B for the set containing everything in

A and everything in B

intersection we write A ∩ B for the set of things that are in both

A and B