ComponentOne DataObjects for .NET
Composite Tables
DataObjects for .NET (Enterprise Edition) > Schema Objects > Composite Tables

A composite table is several simple tables bundled in one. A composite table row represents a row of each constituent simple table, as shown in the following figure:

Composite table rows do not actually store the data shown on the figure, data belonging to the simple tables; they store pointers to simple table rows instead. See Structured Data Storage: Tables and Table Views for explanation on how data is stored in simple and composite tables.

Composite table support is one of the main power features of DataObjects for .NET. It allows you to define business objects with data stored in multiple database tables, objects whose structure is determined by the inherent business domain logic, not by the physical database structure that is often far from the logical structure, due to normalization and other database-specific techniques. Composite tables bridge the gap between physical database structure and logical structure that is needed in business logic and user interface design.

Composite tables represent business objects just as simple tables do. Developers can associate business logic code with composite tables, as with simple tables, using the C1TableLogic component events, see Table Business Logic Events. Each composite table has a class associated with it, with properties corresponding to composite table fields, see Using Typed Data Objects in Business Logic.

A composite table is defined by a diagram with simple tables as nodes connected with arc – relations. For example, the following is a diagram of the composite table shown in the figure above:

or, in brief notation:


Customers Orders Employees
Note: In practice, outer joins are not supported in DataObjects for .NET. One-to-many relations always produce inner joins. This is because every composite table row must contain non-null values for all its primary key fields, and that requires that for every one-to-many relation at least one child row exists for every parent row.
See Also