User manual

Table Of Contents
Working with related files
8-15
Creating many-to-many relationships
In a one-to-one relationship, one record in the master file is related
to one record in the related file. In a one-to-many relationship, one
record in the master file is related to more than one record in the
related file. In FileMaker Pro, you can also create a many-to-many
relationship, in which more than one record in one database file is
related to more than one record in another database file, and more
than one record in that file is related to more than one record in the
first file. (In the example in the previous section, the Invoices file and
the Products file have a many-to-many correspondence, because a
particular invoice may contain many products, and a particular
product may appear on many invoices.)
To create a many-to-many relationship between database files, create
a separate join file (or join table), which is related to the other two
files. A join file allows common data to be shared between the two
files.
Suppose you have two files, Employees and Classes. You want to
know which employees attend which training classes, and which
classes are attended by which employees. Before you create the join
file and define the relationships, the database files look like this:
After you create a join file and define the relationships for the many-
to-many correspondence, the database files look like this:
For more information about creating many-to-many relationships
between database files, choose Help menu > Contents and Index, click
the Index tab, and type many-to-many correspondence.
Employee ID
Name
Department
Employees
Class ID
Title
Date
Classes
Employee ID
Name
Department
Employees
Class ID
Title
Date
Classes
Employee ID
Class ID
Employees In
E
mp
Cl
ass
(J
o
i
n
fil
e
)
Classes In
Title Name
Calculated fields
Relationships
Relationships