RAD Studio |  |

Creating Master/detail Relationships
See Also
Collapse All

Table type datasets can be linked into master/detail relationships. When you set up a master/detail relationship, you link two datasets so that all the records of one (the detail) always correspond to the single current record in the other (the master).

Table type datasets support master/detail relationships in two very distinct ways:

- All table type datasets can act as the detail of another dataset by linking cursors. This process is described in Making the table a detail of another dataset.
- TTable, TSQLTable, and all client datasets can act as the master in a master/detail relationship that uses nested detail tables. This process is described in Using nested detail tables.

Each of these approaches has its unique advantages. Linking cursors lets you create master/detail relationships where the master table is any type of dataset. With nested details, the type of dataset that can act as the detail table is limited, but they provide for more options in how to display the data. If the master is a client dataset, nested details provide a more robust mechanism for applying cached updates.
See Also

Sorting Records with Indexes

Limiting Records with Ranges

Using Indexes to Search for Records

Controlling Read/write Access to Tables

Creating and Deleting Tables

Emptying Tables

Synchronizing Tables

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!