08.02.2014 Views

Web-DSS-Chapter-03

Web-DSS-Chapter-03

Web-DSS-Chapter-03

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

SECTION 3.12 ■ Associative Entities 53<br />

Name<br />

StudentID<br />

Address<br />

DateJoined<br />

ActivityID<br />

Fees<br />

STUDENT<br />

Participates<br />

ACTIVITY<br />

(a)<br />

StudentID<br />

StudentID<br />

ActivityID<br />

Fees<br />

Name<br />

Address<br />

ActivityID<br />

DateJoined<br />

STUDENT<br />

ENROLLMENT<br />

ACTIVITY<br />

(b)<br />

Figure 3.18 (a) A many-to-many binary relationship; (b) A many-to-many binary relationship converted to an<br />

associated entity.<br />

Notice that when we convert a relationship into an associative entity, we change its name<br />

from a verb to a noun. Therefore, the relationship expressed by the verb participates in Figure<br />

3.18(a) becomes the associative entity represented by the noun enrollment in Figure 3.18(b).<br />

This grammatical distinction parallels the main reason for turning a relationship into an associative<br />

entity. A verb expresses an action, a process. However, once we want to count, record, or<br />

analyze an instance of that process, we end up with a person, place, or thing. In short, by transforming<br />

a relationship into an associative entity, we can analyze and record a process in the same<br />

way that we analyze and record a noun.<br />

In <strong>Chapter</strong> 4, we make it clear why we can only turn a many-to-many relationship into an<br />

associative entity. We convert a ternary relationship into an associative entity as it allows us to<br />

express the cardinalities of a relationship correctly. We will now consider another example of associative<br />

entity converted from a ternary relationship.<br />

The E-R diagram shown in Figure 3.19 is similar to the one we first observed in Figure 3.16.<br />

Here, we convert the ternary relationship instance Performs into the associative entity PER-<br />

FORMANCE. We change the verb performs, an action not necessarily related to a specific event,<br />

to performance, a noun that expresses an event that can be recorded, counted, and analyzed.<br />

Observe that the identifier of the associated entity PERFORMANCE is comprised of the union<br />

of the identifiers of the entities involved in the ternary relationship. One of the most important

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

Saved successfully!

Ooh no, something went wrong!