際際滷

際際滷Share a Scribd company logo
Oum Saokosal
Master of Engineering in Information System
Jeonju University, South Korea
O12-252-752
Mapping: Chen ERD to Table
Relationship
Notation in Chen's E-R Diagram
 Entity
Note: An Entity in ER is an interested Entity.
 Relationship
 Weak Entity
 Identifying Relationship
Student
Register
Play on
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
category
code
description
Mapping: 1-N
Seller make Purchase
1 N
hire_date
id
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 id
has to be included the table Purchase in
order to make it 1-to-M relationship.
Mapping: 1-1
Student has Profile
1 1
tel
id
name
sex address
father
photo
favorite
other
mother
Note:
st_id: Autonumber
pro_id: Number
Mapping: M-N
Student Register Class
M N
register date
reg id
tel
id
name
sex address
id
name
year
semester
capacity
Mapping: ISA Relationship
Student
tel
id
name
sex address
isa
Bachelor
Master
PhD
publication
research
thesis
dissertation
Note:
In Student:
st_id: Autonumber
In Bachelor, Master,
PhD:
st_id: Number
Mapping: M-N Tenary
Student Register Class
M N
register date
reg idtelid
name
sex
address
id
name
year
semester
capacity
Cashier
name
tel
T
Mapping: M-1 Unary (1)
Employee
tel
id
name
sex
address
Report to
M
1
Cannot enter 4 in
table em_report_to
because no em_id = 4 yet.
Mapping: M-1 Unary (2)
SELECT S.em_id, S.em_name AS Boss, T.em_id, T.em_name AS Staff
FROM tbl_employee AS S, tbl_employee AS T
WHERE S.em_id = T.em_report_to;
Mapping: M-N Unary
Employee
tel
id
name
sex
address
Report to
M
N
Oum Saokosal
Master of Engineering in Information Systems,
Jeonju University, South Korea
012-252-752
oum_saokosal@yahoo.com
End of Chapter

More Related Content

Database Concept - ERD Mapping to MS Access

  • 1. Oum Saokosal Master of Engineering in Information System Jeonju University, South Korea O12-252-752 Mapping: Chen ERD to Table Relationship
  • 2. Notation in Chen's E-R Diagram Entity Note: An Entity in ER is an interested Entity. Relationship Weak Entity Identifying Relationship Student Register Play on
  • 3. 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 category code description
  • 4. Mapping: 1-N Seller make Purchase 1 N hire_date id 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 id has to be included the table Purchase in order to make it 1-to-M relationship.
  • 5. Mapping: 1-1 Student has Profile 1 1 tel id name sex address father photo favorite other mother Note: st_id: Autonumber pro_id: Number
  • 6. Mapping: M-N Student Register Class M N register date reg id tel id name sex address id name year semester capacity
  • 7. Mapping: ISA Relationship Student tel id name sex address isa Bachelor Master PhD publication research thesis dissertation Note: In Student: st_id: Autonumber In Bachelor, Master, PhD: st_id: Number
  • 8. Mapping: M-N Tenary Student Register Class M N register date reg idtelid name sex address id name year semester capacity Cashier name tel T
  • 9. Mapping: M-1 Unary (1) Employee tel id name sex address Report to M 1 Cannot enter 4 in table em_report_to because no em_id = 4 yet.
  • 10. Mapping: M-1 Unary (2) SELECT S.em_id, S.em_name AS Boss, T.em_id, T.em_name AS Staff FROM tbl_employee AS S, tbl_employee AS T WHERE S.em_id = T.em_report_to;
  • 12. Oum Saokosal Master of Engineering in Information Systems, Jeonju University, South Korea 012-252-752 oum_saokosal@yahoo.com End of Chapter