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
- In the hierarchical pane of the Semantics tab of the Model Editor, right-click the entity for which the relationship is being created.
- Click Add Relationship.
- 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.
- 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.
- In Help Text, enter any information about the relationship that it to be displayed to the user.
- 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.
- 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.
- 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.