|Creating Database Relationships|
|Part 3: Finishing Touches|
6. Choose whether to enforce Referential Integrity. In most circumstances, you will want to select this option. This is the real power of a relationship -- it ensures that new records in the Orders table only contain the IDs of valid employees from the Employees table.
You'll also notice two other options here. The "Cascade Update Related Fields" option ensures that if an EmployeeID changes in the Employees table that change is propagated to all related records in the Orders table. Similarly, the "Cascade Delete Related Records" option removes all related Orders records when an Employee record is removed. The use of these options will depend upon the particular requirements of your database. In this example, we'll won't utilize either one.
7. Open the Join Type dialog box.
8. Select a join type. The three options are shown in the figure below. If you're familiar with SQL, you might notice that the first option corresponds to an inner join, the second to a left outer join and the final to a right outer join. We'll use an inner join for our example.
9. Create the relationship.
Voila! The relationship window now reflects our new relationship!
Be sure to check back soon for another informative database article. Content is added to the site weekly. If you'd like an e-mail reminder, be sure to sign up for our newsletter.