Create the Relationships
Now that we’ve created the three additional tables, our next task is to relate them to the Main table. Each of these relationships will be a one-to-many relationship; that is, one record in Main can correspond to many records in the related table. For instance, a CD in Main may have multiple interest records in the CD table. You relate data tables by specifying match fields in the tables.
- Choose File > Define > Database. Click the Relationships tab at the top of the Define Database dialog box. All tables defined for the current database are displayed as tiny boxes.
- Optional: You’ll note that the initial table was automatically named Investment Minder (to match the database’s file name). To rename this table, click the Tables tab, select the Investment Minder table, replace its name with Main in the Table Name box, and click Change.
- You specify relationships with lines that match fields between tables. To create the relationship between the Main and Savings tables, click the Sav_Savings Account field in the Main table and drag to the Account field in the Savings table. These fields will hold savings/money market account numbers. Transactions in Savings will be linked to Main via matching account numbers.
- To create the relationship between Main and Stocks, drag a line from Description (Main) to Identifier (Stocks).
Note that if you can’t see the necessary field(s), the table boxes contain up and down scroll arrows you can click.
- To specify the final relationship, drag a line from CD_Certificate (Main) to Identifier (CD).
- Optional: Chances are good that the relationship lines are difficult to see because they run through other table boxes. To make them
easier to interpret, you can drag the table boxes to new locations (as shown below).
Note: As you select match fields to define relationships, copies of these field names are automatically added to the top of the field’s table.