16.11.2012 Views

this pdf excerpt

this pdf excerpt

this pdf excerpt

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pes.<br />

Jme<br />

oan<br />

rt of<br />

visor<br />

the<br />

The<br />

hips<br />

:d in<br />

into<br />

rela-<br />

-epts<br />

and<br />

atios<br />

rship<br />

ociar<br />

the<br />

rela-<br />

.', the<br />

indi-<br />

tlter-<br />

Each<br />

slm-<br />

Ilon-<br />

'e the<br />

Fach<br />

.tnri<br />

nple,<br />

]YEE<br />

rhich<br />

_FOR<br />

trates<br />

r the<br />

-3.<br />

EMPLOYEE<br />

€1<br />

€3<br />

€4<br />

3.4 Relationship Types, Relationship Sets, Roles, and Structural Constraints 71<br />

WORKS FOR DEPARTMENT<br />

:MPLOYEE and DEPARTMENT entities that participate in r,. In the miniworld repre-<br />

.crrted by Figure 3.9, employe€S s1, er, and eu work for department d,; employees el<br />

.rnd en work for department d,; and employees e. and e, work for department d.,.<br />

In ER diagrams, relationship types are displayed as diamond-shaped boxes, which<br />

rrc connected by straight lines to the rectangular boxes representing the participating<br />

entity types. The relationship name is displayed in the diamond-shaped box (see<br />

Irigure 3.2).<br />

3.4.2 Relationship Degree, Role Names,<br />

and Recursive Relationships<br />

Degree of a Relationship Type. The degree of a relationship type is the number<br />

oi participating entity types. Hence, the WORKS FOR relationship is of degree two.<br />

.\ relationship type of degree two is called binary, and one of degree three is called<br />

ternary. An example of a ternary relationship is SUPPLY, shown in Figure 3.10,<br />

rvhere each relationship instance r, associates three entities-a supplier s, a part p,<br />

.ind a project j-whenever s supplies partP to project j. Relationships can generaliy<br />

be of any degree, but the ones most comrnon are binary relationships. Higherdegree<br />

relationships are generally more complex than binary relationships; we char-<br />

.rcterize them further in Section 3.9.<br />

Figure 3.9<br />

Some 'nstarces in the<br />

WORKS_[OR relatror srip<br />

cet whirl' renre..enls r .elationship<br />

type WORKS_FOR<br />

between EMPLOYEE and<br />

DEPARTIVENT.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!