ComponentOne Query 8.0
Relationships

When a user query contains multiple tables, C1Query needs some additional information to join these tables together in a single SQL statement. This information is provided by relationships. A relationship defines joins between two (in the case of a binary relationship, the common case) or more (in the case of a ternary or higher relationship, an advanced case) views.

As an alternative to using relationships, you can use join groups. Join groups allows you to join views in a simpler manner, but they provide less control and can be error-prone if used without caution.

Importing database structure from the database, C1Query creates join relationships based on the foreign key constraints present in the database. In many cases, this will suffice to join views (tables) together in SQL generation, and you will not need to modify the imported relationships. In more involved cases, when the database does not provide enough foreign key information, or when you need to customize the relationships, you can modify existing relationships and add new ones.

To edit a relationship, double click on it in the Relationships palette, or select a relationship and choose Edit from the context menu. A Relationship Designer window will open as an MDI child. You can have multiple designer windows open simultaneously in the schema designer.

To add a new relationship to the schema, use the Add new relationship button on the Relationships palette.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback