Microsoft Office Tutorials and References
In Depth Information
Creating Referential Integrity with Many-to-Many Relationships
2. Choose one of the following options from the contextual menu:
• Delete: If you want to delete the line (which deletes the relationship
and turns off referential integrity), choose the Delete option.
• Edit Relationship: If you want to change something about the
relationship, choose the Edit Relationship option.
If you choose the Edit Relationship option, the Edit Relationships
dialog box opens, allowing you to change or disable referential
integrity. Make your changes and then click OK.
The Join Type button in the Edit Relationships dialog box allows you to set
a default join type to be used in queries. Join types have no bearing on
See Book III, Chapter 1 for more information on join types.
Creating Referential Integrity with
As we discuss in Book I, Chapter 3, a many-to-many relationship often exists
among chunks of data. Think of a school, which has many students enrolled
in many courses. To design a database that contains information about
students, courses, and enrollment, you need three tables:
✦ One table, perhaps named Students, contains a record for each student,
with a primary key field named StudentID that uniquely identifies each
✦ A second table, perhaps named Courses, contains one record for each
course, with a primary key named CourseID that uniquely identifies
✦ To keep track of which students are enrolled in which courses, you need
a third table (called a junction table) containing a record that pairs a
StudentID with a CourseID.