ComponentOne DataObjects for .NET
View Relations
DataObjects for .NET (Enterprise Edition) > Schema Objects > View Relations

View relations (ViewRelation objects) are depicted in a data set diagram with arrows connecting nodes - table views. View relations are optional; it is possible to have a data set without them. View relations play the following roles:

A view relation between table views is usually based on the relation (Relation object) between the two tables represented by those two table views (except for custom view relations, see Custom View Relations). This relation can be simple or composite (see Simple Relations and Composite Relations). It is determined by the ViewRelation.Relation property. A view relation, as an arc in the data set diagram, can have direction opposite to the direction of the table relation on which it is based. For example, having a one-to-many relation Customers – Orders, we can create a many-to-one view relation Orders – Customers, based on Customers – Orders, but in inverse order (direction). So, if the Relation object Customers – Orders has Parent = Customers, Child = Orders, the view relation, if inverted, will have Parent = Orders, Child = Customers. This inversion does not change the original Relation object. Usual practice is to define all simple relations, Relation objects shown in the Relations window as one-to-many, and then apply them in diagrams, create view relations based on them, in direct (one-to-many) or inverse (many-to-one) order. To invert a view relation, right-click the relation in the diagram and select Invert from the context menu that appears.

See Also