The Context of Your Business Data: Attributes » Attribute relationships » Viewing and editing the parents and children of attributes

Viewing and editing the parents and children of attributes

The relationships that exist between attributes rely on the parent-child specifications that you assign to attributes. How attributes relate to one another and the types of relationships they share define the system hierarchy which is used to generate SQL. This SQL, in turn, determines the output of a report.

Parent-child relationships were designated when attributes were selected for the new project. However, you can continue to make changes to the relationships between attributes even after creating your project.

For example, the Distribution Center attribute is the parent of the Call Center attribute. A one-to-one relationship exists between Distribution Center and Call Center. This means that only one call center exists in each distribution center. Country, in turn, is the parent of Distribution Center and multiple distribution centers exist in each country. So these two attributes have a one-to-many relationship.

Assigning parent-child relationships to attributes allows you to connect attributes to one another in user hierarchies, as discussed in Creating Hierarchies to Organize and Browse Attributes. Also, when a report generates inaccurate SQL and results, viewing and changing parent-child relationships may be a necessary troubleshooting method.

Follow the procedure below to view and edit the parents and children of the Distribution Center attribute.

You can also use Architect to define relationships between attributes. Architect can provide a more intuitive and helpful workflow that allows you to view and modify multiple attributes as you define attribute relationships, as described in Defining attribute relationships.

To view and edit the parents and children of an attribute

1 In MicroStrategy Developer, log in to the project source that contains the MicroStrategy Tutorial project and then log in to MicroStrategy Tutorial.
2 Navigate to the Schema Objects folder, open the Attributes folder, and then the Geography folder.
3 Double-click the Distribution Center attribute. If a message is displayed asking if you want to use read only mode or edit mode, select Edit and click OK to open the Attribute Editor in edit mode so that you can make changes to the attribute. The Attribute Editor opens.
If you are only given the option of opening the Attribute Editor in read only mode, this means another user is modifying the project’s schema. You cannot open the Attribute Editor in edit mode until the other user is finished with their changes and the schema is unlocked.
For information on how you can use read only mode and edit mode for various schema editors, see Using read only or edit mode for schema editors.
4 Click the Children tab. The Call Center attribute is listed, along with the relationship type it shares with Distribution Center, and the relationship table in which the relationship exists.

Consider a scenario in which multiple call centers now exist in the same distribution center so they no longer have a one-to-one relationship; in this case, you must change the relationship type between Call Center and Distribution Center.

5 To change the relationship type, select One to Many from the Relationship type drop-down list.
6 You also want the relationship between the two attributes to be defined in the LU_Employee table instead of the LU_Call_Ctr table in which it is defined now. To change the relationship table, select the LU_Employee table from the Relationship table drop-down list.
7 Click the Parents tab. The Country attribute is listed, along with the relationship type it shares with Distribution Center, and the relationship table in which the relationship exists.

From this Parents tab, you can view or modify the existing parent attribute relationships, as well as create or delete new parent attribute relationships.

8 Because this is only an example, close the Distribution Center attribute without saving your changes.