How to add a relationship

English Query

English Query

How to add a relationship

Refine a model by adding relationships to those automatically generated by the Project wizard (for example, the relationship customers have names).

To add a relationship

  1. In the hierarchical pane of the Semantics tab of the Model Editor, right-click the entity for which the relationship is being created.

  2. Click Add Relationship.

  3. On the Semantics tab under Entities, click Add.

    Double-click the other entity to be included in the relationship.

    Specify when the relationship occurs by setting the When, Start and End times. Set a Default date if to have the relationship assume a selected date.

    To set the relationship to occur over a period of time, set Duration.

    To set the location of the relationship, set the Where option.

  4. Under Phrasings, click Add and proceed as if adding a phrasing.

    To specify that specific phrasings be grouped together to define the relationship, select them, and then click Group.

  5. In Help Text, enter any information about the relationship that it to be displayed to the user.

  6. To let English Query find the table containing all the joins to the tables and fields representing the entities in the relationship, click the Database tab and select a table from the Table that contains joins to all entities in this relationship list or click Calculate Default Join Table.

    Note  The Database tab is available only when a project is enabled for SQL.

  7. To specify when a relationship is true, on the Database tab select This relationship is true only when the following SQL condition is true, and enter the appropriate SQL condition.

  8. To have English Query generate answers from the most recent data in the database, on the Database tab select Show most recent data by default.

See Also

Database Tab (Relationship/New Relationship Dialog Box)

How to add a join

How to add an entity to a relationship

How to add phrasings to a relationship

Model Editor

Relationship/New Relationship Dialog Box

Semantics Tab (Model Editor)

Semantics Tab (Relationship/New Relationship Dialog Box)