beautypg.com

One-to-one relationships, One-to-many relationships, Performance considerations in one-to-many links – HP Intelligent Management Center Standard Software Platform User Manual

Page 666: Performance considerations in one-to-many, Links

background image

One-to-one relationships

In a one-to-one relationship between records in two linked tables, for every
record in the primary table there is only one matching record in the lookup
table (based on the linked fields). For example, in the Xtreme.mdb database,
the Employee table can be linked to the Employee Addresses table based
on the Employee ID field in each table. The Employee table contains
information about employees at the company, the positions they hold, their
salaries, hiring information, and so on. The Employee Addresses table
contains each employee's home address. There is only one record for each
employee in each of these tables. Therefore, if the Employee table is linked
to the Employee Addresses table, only one record will be found in the
Employee Addresses table for each record in the Employee table. This is a
one-to-one relationship.

One-to-many relationships

In a one-to-many relationship between records in two linked tables, for every
record in the primary table, there may be more than one matching record in
the lookup table, based on the linked fields. In the Xtreme.mdb database,
the Customer table can be linked to the Orders table based on the Customer
ID field in each table. The Customer table contains information about each
customer that has placed an order with the company. The Orders table
contains information about orders that customers have placed. Since
customers can place more than one order, there may be more than one
record in the Orders table for each customer record in the Customers table.
This is a one-to-many relationship.

Performance considerations in one-to-many links

The information provided in this section is intended to help you maximize
processing speed and minimize network traffic when you are running your
reports. You will learn about the best ways to use selection formulas and
indexes in one-to-many situations to make your reporting more efficient. If
you do not use the information in this section, your reports may end up
processing dozens or even thousands more records than necessary.

666

Crystal Reports 2008 SP3 User's Guide

Understanding Databases

25

Linking tables