Operation Manual

Understanding Databases
Linking tables
25
Crystal Reports User’s Guide 489
Instead, you can create an index for the table based on the Customer field.
Such an index might look like this:
In this index, information is organized by customers, not order numbers. Also,
notice that the second column actually contains pointers to specific order
numbers in the original table. By using this index, the database engine can
search just the information in the Customer column until it finds the customer
you are interested in, Sierra Bicycle Group.
For each correct customer entry the database engine finds in the index, it
looks up the matching order in the table according to the pointer in the second
column of the index. Only the orders for the correct customer are read.
Finally, since information in the index is organized according to the customer
names, the database engine does not need to continue searching through the
index or the table as soon as it finds an index entry that does not match the
requested customer.
The advantage of this highly organized search through a database table
according to an index is speed. Using indexes speeds up data retrieval and
report generation, important factors when reporting on large database files.
Linking tables
You link tables so records from one table will match related records from
another. For example, if you activate an Orders table and a Customers table,
you link the tables so that each order (from the Orders table) can be matched
up with the customer (from the Customer table) that made the order.
Customer Pointer to Order#
Allez Distribution 10444
BG Mountain Inc. 10470
BG Mountain Inc. 10511
La Bomba de Bicicleta 10501
Mountain Toad 10488
Mountain Tops Inc. 10568
SFB Inc. 10495
Sierra Bicycle Group 10544
Sierra Bicycle Group 10579
Sierra Mountain 10485