12
Oum Saokosal Master of Engineering in Information System Jeonju University, South Korea O12-252-752 Mapping: Chen ERD to Table Relationship

Database Concept - ERD Mapping to MS Access

Embed Size (px)

Citation preview

Page 1: Database Concept - ERD Mapping to MS Access

Oum SaokosalMaster of Engineering in Information System

Jeonju University, South KoreaO12-252-752

Mapping: Chen ERD to Table Relationship

Page 2: Database Concept - ERD Mapping to MS Access

Notation in Chen's E-R Diagram

EntityNote: An Entity in ER is an interested Entity.

Relationship

Weak Entity

Identifying Relationship

Student

Register

Football Player

Play on

Page 3: Database Concept - ERD Mapping to MS Access

Attribute Attribute

(XXX 1 – 1 dob) Multi-valued Attribute

(XXX 1 – M tel)

Composite Attribute (XXX M – 1 address)

(XXX 1 – 1 address)

Multi-valued Composite Attribute(XXX 1 – M Category)

Derived Attribute (XXX 1 – 1 age)

dob

tel

address

age

House

Street

categorycode

description

Page 4: Database Concept - ERD Mapping to MS Access

Mapping: 1-N

Seller make Purchase1 N

hire_dateid

name

tel other

id

date

name

Customer

tel

Note: in ER diagram, seller id is not included in the table Purchase. It is the foreign key referenced from the table Seller.However, in the table relationship, seller idhas to be included the table Purchase in order to make it 1-to-M relationship.

Page 5: Database Concept - ERD Mapping to MS Access

Mapping: 1-1

Student has Profile1 1

telid

name

sex address

father

photo

favoriteother

mother

Note:st_id: Autonumberpro_id: Number

Page 6: Database Concept - ERD Mapping to MS Access

Mapping: M-N

Student Register ClassM N

register datereg id

telid

name

sex address

id

name

yearsemester

capacity

Page 7: Database Concept - ERD Mapping to MS Access

Mapping: ISA Relationship

Student

telid

name

sex address

isa

Bachelor

Master

PhD

publication

research

thesis

dissertation

Note:In Student:st_id: Autonumber

In Bachelor, Master,PhD:st_id: Number

Page 8: Database Concept - ERD Mapping to MS Access

Mapping: M-N Tenary

Student Register ClassM N

register date

reg idtelidname

sexaddress

idname

yearsemester

capacity

Cashiername tel

T

Page 9: Database Concept - ERD Mapping to MS Access

Mapping: M-1 Unary (1)

Employee

telid

name

sex

address

Report to

M1

Cannot enter 4 intable em_report_tobecause no em_id = 4 yet.

Page 10: Database Concept - ERD Mapping to MS Access

Mapping: M-1 Unary (2)

SELECT S.em_id, S.em_name AS Boss, T.em_id, T.em_name AS StaffFROM tbl_employee AS S, tbl_employee AS TWHERE S.em_id = T.em_report_to;

Page 11: Database Concept - ERD Mapping to MS Access

Mapping: M-N Unary

Employee

telid

name

sex

address

Report to

MN

Page 12: Database Concept - ERD Mapping to MS Access

Oum SaokosalMaster of Engineering in Information Systems,

Jeonju University, South Korea012-252-752

[email protected]

End of Chapter