You are on page 1of 8

2110422

7-1

7*
ER EER

Relational Database Design by ER- and EER-to-Relational


Mapping

1. (ER Diagram)
2. (ER Model) (EER Model)
3. (Relation) (EER Model)

7.1

ER
1 :
ER

(Primary Key)

7.1
ER Diagram
COMPANY

* 7 [1]

2110422

7-2

7.1 ER Diagram Company

7.2

ER
COMPANY
7.2 Company
7.1 7.2 Employee, Department Project SSN,
DNumber PName
2 : Weak
ER
( SSN
Employee) ER (Combine
Key) ( Dependent
ESSN Dependent_Name)
3 : 1 : 1
ER 1:1 3
1. (
Department SSN
MGRSSN Department
2.
3. ER

4 : 1 : n
n (n-side)
Employee n Department 1
Dnumber Employee DNO
5 : m : n

2110422

7-3


m-n
Employee m Project n
SSN PNumber Work_On
Hours Work_On
6 : (Multivalued attribute)


Location
Department Location Dept_Locations
DLocation Department DNumber
DNumber DLocation
Dept_Locations
7 :
2

1.2-1 1.2-2 Supplier, Part
Project Supply
SName , PartNO ProjName Quantity
Supply

7.3
ER Diagram
SUPPLY

7.3 ER-Diagram SUPPLY

7.4

7.4

2110422

7-4

ER
ER

(Entity Type)
(Entity Relation)
1: 1 1 : n
(Foreign Key)
m : n
(2 )
n-nary
(n )
(Simple attribute)

(Composite attribute)

(Multivalued attribute)

7.2

EER
8 :
m () C C {k,a1,a2,.,an} k
4
4
1. 8A (Multiple Relations Superclass and
Subclasses)
2.

8B (Multiple Relations Subclass Relations

3.

Only)
8C (Single Relation with one type attribute)

4.

8D (Single Relation with Multiple type attributes)

7.5 7.11 4

7.5
EER
JobType

7-5

2110422

7.6
8A

7.7
EER
VEHICLE

7.8
8B

Tonnage

7.9
8C

7.10
EER
PART

overlapping
(non-disjoint)

EngType

2110422

7-6

7.11
8D
9 : UNION (Categories)
map category superclass
Surrogate Key category
7.12 OWNER OWNER category
category primary key OWNER surrogate key
OwnerId
7.13 EER 7.12

7.12
EER
2 Categories
( UNION)
OWNER
REGISTERED_
VEHICLE

7-7

2110422

OwnerID

CYear

7.13
EER

1.

ER

2110422

2.

ER

3.

EER

7-8

You might also like