MicroStrategy ONE

Automatically defining attribute relationships

In addition to manually defining attribute relationships (see Defining attribute relationships) you can also allow Architect to automatically define attribute relationships based on the design of your data in your data source.

The steps below show you how to automatically define attribute relationships based on the design of your data in your data source.

Prerequisite

You have created attributes for your project (see Creating and modifying attributes).

To automatically define attribute relationships

  1. In MicroStrategy Developer, log in to a project.

  2. From the Schema menu, select Architect.

  3. If a message is displayed asking if you want to open Architect in read only mode or edit mode, select Edit and click OK to open Architect in edit mode so that you can make changes to the project. MicroStrategy Architect opens.

    If you are only given the option of opening Architect in read only mode, this means another user is modifying the project's schema. You cannot open Architect 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. From the Hierarchy View, on the Home tab, in the drop-down list on the Hierarchy area of the toolbar, select System Hierarchy View. The system hierarchy is displayed.

  5. Right-click within the area that displays the attributes for your project, and select Recognize Relationships. The System Hierarchy dialog box opens.

  6. You can select from the following options to automatically define attribute relationships:

    • Based on Primary Keys/Foreign Keys: Creates attribute relationships based on the primary keys and foreign keys defined on your tables. Each attribute that acts as a foreign key of a table is defined as a parent attribute of each attribute that acts as a primary key of the same table. The attribute relationship is defined as a one-to-many relationship from the foreign key attribute (parent attribute) to the primary key attribute (child attribute).

    • Based on lookup tables: Creates attribute relationships based on lookup tables that do not include primary key or foreign key information. To define a table as a lookup table for an attribute, see Creating attributes. Each attribute that defines a table as its lookup table is defined as a child attribute of all other attributes in the same table, that do not define the table as its lookup table. Each attribute relationship is defined as a one-to-many relationship from the parent attribute to the child attribute.

    • Based on sample data from the table: Creates attribute relationships for attributes that share the same lookup table. To define a table as a lookup table for an attribute, see Creating attributes.

      Architect analyzes sample data for the table. The attributes with fewer distinct values are defined as parents of the attributes with more distinct values, using a one-to-many relationship from the parent attribute to the child attribute. For example, a lookup table includes four rows of data, which include data related to year and quarter. Each row includes the same year (for example, 2009), but the quarter changes for each row (Q1, Q2, Q3, Q4). In this case, the Year attribute is created as a parent of the Quarter attribute.

  7. Once you have selected the appropriate options, click OK.

    • If you selected the Show preview results check box to preview the results of automatically defining attribute relationships (see Defining project creation and display options) the Results Preview dialog box is displayed. From this dialog box, you can select which attribute relationships should be created and which attribute relationships should be excluded. After you have made all your selections, click OK to allow Architect to automatically define attribute relationships.

    • If you cleared the Show preview results check box (see Defining project creation and display options) Architect automatically creates all potential attribute relationships without first displaying them in the Results Preview dialog box.

      After all relationships are determined by the rules that you selected, Architect performs final analysis on the attribute relationships that are to be created. Any attribute relationships that are found to be redundant are not created. This ensures that attribute relationships are created that properly reflect the design of the data in your data source. For information on modifying the attribute relationships that are created, see Defining attribute relationships.