04.06.2015 Views

Database Modeling and Design

Database Modeling and Design

Database Modeling and Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

26 CHAPTER 2 The Entity-Relationship Model<br />

each of the other two associated entities. It is “many” if more than one<br />

instance of it can be associated with one instance of each of the other<br />

two associated entities. In either case, it is assumed that one instance of<br />

each of the other entities is given.<br />

As an example, the relationship “manages” in Figure 2.6c associates<br />

the entities Manager, Engineer, <strong>and</strong> Project. The entities Engineer <strong>and</strong><br />

Technician<br />

1 usesnotebook<br />

1<br />

1<br />

Project<br />

Notebook<br />

A technician uses exactly one notebook for<br />

each project. Each notebook belongs to one<br />

technician for each project. Note that a<br />

technician may still work on many projects<br />

<strong>and</strong> maintain different notebooks for<br />

different projects.<br />

Functional dependencies<br />

emp-id, project-name → notebook-no<br />

emp-id, notebook-no → project-name<br />

project-name, notebook-no → emp-id<br />

(a) One-to-one-to-one ternary relationship<br />

Project<br />

1<br />

assignedto<br />

N<br />

1<br />

Employee<br />

Location<br />

Each employee assigned to a project works at<br />

only one location for that project, but can be<br />

at different locations for different projects. At<br />

a particular location, an employee works on<br />

only one project. At a particular location,<br />

there can be many employees assigned to<br />

a given project.<br />

Functional dependencies<br />

emp-id, loc-name → project-name<br />

emp-id, project-name → loc-name<br />

(b) One-to-one-to-many ternary relationship<br />

Figure 2.6<br />

Ternary relationships

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

Saved successfully!

Ooh no, something went wrong!