YOUR TURN TO PLAY
Double-click the name of the dependency (Class Full Name = Class Full Name) to open the ‘Joins’ tab on the relationship, shown in Figure 14.20.
Here you can see the name of the primary identifier in Class, and the names of the original and migrated attributes. You have the option here to change the attribute migration policy for the relationship, perhaps to link the relationship to a different attribute in the Attendance entity. Any such changes have to be carefully considered, and are outside of the scope of this book.
“Relationship Property Sheet Joins Tab (LDM)” (Data Modeling)
YOUR TURN TO PLAY
Open the list of identifiers for the model, via the Model menu. This list also has a P (primary) column – the identifier for Student is the only one not checked. See Figure 14.21. To convert it, just check the P column and click <OK>.
Look at the diagram in Figure 14.22 – can you see the changes that have been made to Student and Attendance? The changes are listed in Table 14.7.
Student | * the identifier is tagged with <pi> instead of <ai> |
Attendance | * Student Number has been migrated to the entity Attendance, where it is flagged as <fi> |
YOUR TURN TO PLAY
Open the ‘Cardinalities’ tab on the property sheet for the relationship shown in Figure 14.22; select ‘Dependent’ for the ‘Attendance to Student’ direction, and click on <OK>. The result is shown in Figure 14.23, and the changes are listed in Table 14.8.
Attendance entity | * new primary identifier created |
Relationship | * displays the ‘dependent’ notation |
YOUR TURN TO PLAY
Open the property sheet for the entity Attendance, and change the name of Student Number to Attending Student Number. The two attributes are still linked, but they no longer have identical names.
YOUR TURN TO PLAY
In the entity Attendance, open the property sheet for the attribute Class Full Name, select Primary Identifier on the ‘General’ tab, and click <OK>.
Look at Figure 14.24 – can you see the change to Attendance? Class Full Name is now tagged as <pi>. The relationship from Class has also changed – it is now a dependent relationship, so the symbol has changed.
So far we have created most of the candidate identifiers listed in Table 14.6, and all of our entities now have primary identifiers. Only one entity (Attendance) is incomplete - it is an associative entity with a composite identifier, made up of two migrated attributes that PowerDesigner created automatically for us, when we created the primary identifiers for the two parent entities. Look back at Table 14.6, and you will see that the candidate key for Attendance is not complete; we still need to include the attribute Attendance Date.