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.

Figure 14.20 The ‘Joins’ tab for a relationship

14.20.emf

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>.

Figure 14.21 Three primary identifiers

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.

Figure 14.22 Demonstrating attribute migration

14.22.emf

Table 14.7 Entity Changes

Student

* the identifier is tagged with <pi> instead of <ai>
* Student Number is tagged with <pi> instead of <ai>, and the font style may have changed (depending on your display preferences)

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.

Figure 14.23 Dependency changes

14.23.emf

Table 14.8 Dependency changes

Attendance entity

* new primary identifier created
* Student Number now included in primary identifier, flagged as <pi> and <fi>, and the font style will probably have changed (depending on your display preferences)

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.

Figure 14.24 Composite Identifier

14.24.emf

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset