Consideration 3, The database expert links tab, Linking indexed tables – HP Intelligent Management Center Standard Software Platform User Manual

Page 676

Advertising
background image

Consideration 3

If the fields you are using from Table A are not indexed, but there is an
indexed field that you can use in your record selection request, use that field.
For example, assume that you have three products (Product 1, Product 2,
and Product 3) and you want to identify all sales of Product 2 in the U.S.
There is no index on the Product field but there is an index on the Order Date
field. Since you know that Product 2 did not begin shipping until July of 1995,
you can improve speed by limiting your report to orders placed in and after
July 1995 using the selection formula. In such a case, the program uses the
Order Date index to retrieve only those orders from July 1995 and afterward
(a small subset of the entire database) and then searches for the occurrences
of Product 2 in that subset, not in the entire database.

The Database Expert Links tab

The Database Expert Links tab lets you easily link two or more tables. Choose
the Database Expert from the Database menu to display all current tables;
then choose the Links tab to display all current links.

The easiest way to link database tables is to select Auto Link in the Database
Expert Links tab. Auto Link automatically chooses links for your tables based
on common fields in tables or indexed fields (if your database supports
indexed fields).

Linking indexed tables

When you are linking direct-access database tables, you link from a primary
table to a field in the lookup table. The link field in the primary table can be
indexed, but does not have to be. The link field in the lookup table does not
have to be indexed, either, unless you aren't using a native driver for your
connection.

In addition, the fields used to link two tables must have the same data type.
For example, you can link a string field in one table to a string field in another
table, or a numeric field in one table to a numeric field in another table, but
you cannot link a numeric field in one table to a string field in another table.

676

Crystal Reports 2008 SP3 User's Guide

Understanding Databases

25

Linking tables

Advertising