This document provides mappings from Chen's entity-relationship (ER) diagram notations to database tables. It discusses how various ER relationships such as one-to-one, one-to-many, many-to-many, weak entity, and inheritance mappings are represented in tables. Examples are given for each type of relationship such as a one-to-many relationship between a Seller and Purchase or a many-to-many relationship between a Student and the Classes they register for. Notes are included to explain considerations for representing relationships properly in tables.
1 of 12
Downloaded 55 times
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
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;