Problem

Figure 2-27 represents a situation of students who attend and work in schools and who al...

Figure 2-27 represents a situation of students who attend and work in schools and who also belong to certain clubs that are located in different schools. Study this diagram carefully to try to discern what business rules are represented.

a. You will notice that cardinalities are not included on the Works For relationship. State a business rule for this relationship, and then represent this rule with the cardinalities that match your rule.

b. State a business rule that would make the Located In relationship redundant (i.e., where the school in which a club is located can be surmised or derived in some way from other relationships).

c. Suppose a student could work for only a school that student attends but might not work. Would the Works For relationship still be necessary, or could you represent whether a student works for the school she attends in some other way (if so, how)?

Step-by-Step Solution

Solution 1

a.

The business rule for the relationship “Works For” to indicate the cardinality relationship is as follows:

• A student may or may not work for one or more schools. In other words, the entity STUDENT has an optional one cardinality with the entity SCHOOL.

• One school may employ one or more number of students. In other words, the entity SCHOOL has an optional many cardinality with the entity STUDENT.

• The cardinality relationship between STUDENT and SCHOOL are 0:1(Zero-to-One).

• The cardinality relationship between SCHOOL and STUDENT are 0:M (Zero-to-Many).

The modified E-R diagram with the cardinalities included for the “Works For” relationship is as shown below:

C:\Users\300889\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\XNEWY8E1\10943-2-13PE_fig1 (2).jpg

b.

The business rule that would make the relationship “Located In” redundant is as follows:

• One or more students can belong to a club.

• A CLUB can be located at the SCHOOL where he or she attends.

Therefore, if the CLUB is located in SCHOOL where he or she attends then the STUDENT belongs to CLUB.

c.

This business rule states that the students work for the school only which he attends but may not work.

• In that case Works for relationship is redundant and can be removed.

• As there is zero or many relationship between the Students and Club, the student will belong to the Club.

• Also, there is zero or many relations between the Club and School. Hence, the Club is located in the School.

The modified E-R diagram after removing “Works For” relationship is as shown below:

Picture 2

Add your Solution
Textbook Solutions and Answers Search