Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
car1
((ABC 123, TEXAS), TK629, Ford Mustang, convertible, 1999, (red, black))
car2
((ABC 123, NEW YORK), WP9872, Nissan 300ZX, 2-door, 2002, (blue))
car3
((VSY 720, TEXAS), TD729, Buick LeSabre, 4-door, 2003, (white, blue))
.
.
.
ENTITY TYPE
RELATIONSHIP TYPE
ATTRIBUTE
KEY ATTRIBUTE
MULTIVALUED ATTRIBUTE
COMPOSITE ATTRIBUTE
DERIVED ATTRIBUTE
E1 R E2 TOTAL PARTICIPATION OF E2 IN R
E1 N
R E2 CARDINALITY RATIO 1:N FOR E1:E2 IN R
(min,max)
R E STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION
OF E IN R
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 3-11
Copyright © 2004 Pearson Education, Inc.
ER DIAGRAM – Entity Types are:
EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT
r1
e1 d1
e2 r2
e3 r3 d2
e4 r4
d3
e5
r5
e6
r6
e7
r7
r9
r1
e1 p1
e2 r2
e3 r3 p2
e4 r4
p3
e5
r5
e6
r6
e7
r 8 r7
r1
e1 d1
e2 r2
e3 r3 d2
e4 r4
d3
e5
r5
e6
r6
e7
r7
r9
r1
e1 p1
e2 r2
e3 r3 p2
e4 r4
p3
e5
r5
e6
r6
e7
r 8 r7
e1 2
1 r1
e2 2
1
r2
e3 2
1
e4 2 r3
1
e5 1
2 r4
e6 1
2 r5
e7
r6
© The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition
relationship instances in R
Default(no constraint): min=0, max=n
Examples:
A department has exactly one manager and an employee can manage at most
one department.
– Specify (0,1) for participation of EMPLOYEE in MANAGES
An employee can work for exactly one department but a department can have
(0,1) (1,1)
(1,1) (1,N)
© The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition