Relational Databases using Filemaker Pro 4.0 Contents
David Remsen

The Relation - One's Perspective
We can choose to create a relationship from Patients to Admissions, from Admissions to Patients, or both. The classification depends on where one starts. The only time it's important to know the difference is when you wish to display the combined data. We will cover that shortly.

The first relationship we create will be FROM Admissions TO Patients.

Click on the Admissions database to ensure it is the current, active file. Then go the menu, File-Define->Relationships. A dialog box appears as in Figure 2. Select New. Locate the file "Patient" to relate the file. Select "Open"

Define the relationship as in Figure 3. The relationship can have a name. The two column boxes list all available fields in the two files and provide instructions as how to define the relationship. Select PatientID on the left and ID on the right.

The three checked options will, in clockwise order,

  1. Delete a patients record if we decided to delete an admission record (we don't want).
  2. Create a new patient when creating a first-time admission! (might be nice).
  3. Sort related records (only useful in one->many relations, not many->one)

All these features can be edited at a later time. When the relationship is complete the Define Box should appear as in Figure 4.

Repeat this procedure and create a relationship from Patient to the Admissions database.

When finished you won't see anything different at first. But this will change next.


Note: The actual relation exists in the data and is there whether the relationship is declared in FileMaker. Certain DBMS and languages such as SQL don't require a formal declaration at all. One can build the relation right into the search syntax.
Figure 2
Figure 3
Next: :Viewing the Relation
Previous: Creating a Related Table
Figure 4