Relationships <ObjectID> and {relationshipid} each cover only part of the underlying database relationship.

English Query

English Query

Relationships <ObjectID> and {relationshipid} each cover only part of the underlying database relationship.

Message Text

Based on the keys of the join table, this relationship covers only part of the underlying relationship represented in the database. There is another relationship that also covers only part of this underlying relationship. These relationships probably contain phrasings that operate as a group. If so, these relationships should be merged, and their phrasings merged into a phrasing group.

Explanation

There are two or more relationships that include only part of the underlying database relationship. If these relationships remain independent of each other, some questions will not result in an accurate response. For example, the entities manufacturer, product, color, year, and quantity are used to create the following relationships:

  • manufacturers make quantities of products in years
  • products have colors

The relationships are based on the following underlying table.

If these phrases are put into two separate relationships, they will be used by English Query in the following order to generate a response to the question "How many green products did Acme make last year?":

  1. The relationship products have colors will be used to find all of the products that have the color green. The results include the products, both bikes and skateboards, from all manufacturers. This phrase determines that bikes and skateboards are green.

  2. The relationship manufacturers make quantities of products in years will be used to find all of the manufacturers named Acme who make bikes and skateboards and the number of these products that they made last year, regardless of color. (The color was already accounted for in the first phrase.) The second phrase does not incorporate anything about color.

The relationships are based on the:

The total quantity of products is 55. This is not the desired result because it includes red skateboards in the total.

This situation arises when the database tables are structured in a particular way and the tables are not normalized. Although this may be by design, in this case, the color of the bikes is inherently dependent on the product and the manufacturer. The only way for English Query to correctly respond to this question is for it to process both of these phrases simultaneously, instead of in sequence. If both phrases are processed simultaneously, English Query will look for green products that are made by Acme.

Action

To prevent this error:

  • Create or group phrasings to cover the underlying relationship in the database.

  • To correct this error, group the two phrases in one relationship:
    1. Double-click one of the relationships.

    2. In the Relationship dialog box, create the second phrasing.

    3. Select one phrasing, press CTRL, and then select the other phrasing.

    4. Click Group.

    5. Select the products have colors check box.

      A red check mark appears to the left of the phrasing, indicating that the phrase is mandatory. The phrase must be part of this relationship when the relationship is used.

    6. Delete the other relationship.

In the example above, you would:

  1. Create one relationship that contains both of the phrasings, products have colors and manufacturers make quantities of products in years.

  2. Make them a group.

  3. Specify both phrases as mandatory.

Creating a group forces both phrases to be used simultaneously if either one of the phrases is used. Then, English Query will search for products that are both green and made by Acme.

See Also

Compile-Time Error Messages (Authoring Object Model)

Grouped Phrasings Examples

How to add a relationship

Relationship/New Relationship Dialog Box