When to Use User-Defined Data Sources

Previous Next

See Also

User-defined data sources are especially useful because they avoid the use of complex navigation paths. They are also useful in combination with the use of logical views and for tables with composite keys. Some typical examples of situations in which you can use a user-defined data source include:

· Displaying parent details.

 

· Ad-hoc associations between records.

For example, suppose there is a PERSON table with a COUNTRY column. You can now define a user-defined related data source: Persons that are born in the same country as THIS person.

· Navigation from one parent of an intersection table to the other parent table, without showing intersection details.

For example, in the illustration below, the highlighted record in the table on the left has two child records. Each of these child records has a second parent record in the right-hand table. By using a user-defined related data source in combination with a logical view, you can navigate from one parent to the parent records in the other table without showing intersection details (which are often numeric ids).

· Navigation from grandparent to grandchild. This is only possible for tables with composite keys. This is because the primary key column of the grandparent table has to be synchronized with a column of the grandchild table.

 

· Navigation between grandchildren. This is also only possible for tables with composite keys, because there has to be a corresponding column in both grandchild tables.