Isolate Semantically Related Multiple Relationships |
OK, now lets modify the original business diagram and add a link between the
books and the software tools, indicating which books deal with which software
tools, as shown below.
Initial business request
This makes sense after the discussion on Rule 4, and again we may be tempted
to resolve the multiple M:M relationships into a single association, which would
now violate 5th normal form. The ternary association looks identical to the one
shown in the 4th normal form example, and is also going to have trouble
displaying the information correctly. This time we would have even more trouble
because we can't show the relationships between books and software unless we
have a member to link to, or we have to add our favorite dummy member record to
allow the record in the association table.
Incorrect solution
The solution, as before, is to ensure that all M:M relationships that are
independent are resolved independently, resulting in the model shown below. Now
information about members and books, members and software, and books and
software are all stored independently, even though they are all very much
semantically related. It is very tempting in many situations to combine the
multiple M:M relationships because they are so similar. Within complex business
discussions, the lines can become blurred and the correct solution not so
obvious.
Correct 5th normal form
|