Lecture 2
Database Systems Development Data Modelling Using the Entity - Relationship Model


Theoretical Knowledge
    Life Cycle Models
    The Prototyping Approach
    Entity Types
    Relationship Types
Practical Knowledge
    Definition Stage
    Development Stage
    Exercise


Life Cycle Models 

Basic idea: There is a well-defined process by which an application is conceived, developed and implemented

1. Definition stage 

2. Development stage

3. Installation & Operation


The Prototyping Approach

Basic idea: Easier to assess an existing system than an imaginary one

So, system is developed by rapid implementation of prototype system and this is refined until the client is satisfied. 

Four step process: 

Attribute Types


Entity Types - set of entities that have the same attributes

schema student (stuid, stfn, stln, major, credits )




Key Attributes of An Entity Type

Value sets ( domain ) of attributes - Specifies the set of values that may be assigned to that attribute, for each individual entity 

student

stuid

stln

stfn

major

credits

s1015

Jones

Mary

math

42

s1005

Lee

Perry

history

3

s1001

Smith

Tom

history

90

s1010

Burns

Edward

art

63

s1002

Chin

Ann

math

36

s1013

Mccarthy

Owen

math

0

s1020

Rivera

Jane

csc

15


class

course# facid sched room
art103a f101 mwf9 h221
hst205a f115 mwf11 h221
csc201a f105 tuthf10 m110
mth101b f110 mtuth9 h225
csc203a f105 mthf12 m110
mth103c f110 mwf11 h225


faculty

facid facname dept rank
f101 Adams art professor
f115 Smith history associate
f105 Tanaka csc instructor
f110 Byrne math assistant
f221 Smith csc professor


enrolment

course#

stuid

grade

art103a

s1001

a

csc201a

s1020

b

csc201a

s1002

f

art103a

s1010

art103a

s1002

d

mth101b

s1020

a

hst205a

s1001

c

mth103c

s1010

mth103c

s1002

b


department

deptname

location

math

st. george

art

erindale

history

scarborough

csc

st. george


Initial Designing of Student Database

1. student (stuid, stfn, stln, major, credits)

2. class (course #, facid, sched, room)

3. faculty (facid, facname, dept, rank)

4. enrolment (course#, stuid, grade)

5.department (deptname, location)


Relationship Types - Specifies the number of relationship instances that an entity can participate