Defining Key Relationships Using Database Diagrams

A reflexive relationship can be created to link a column in a table with another column in the same table. For example, the employee table may have an emp_id column and a mgr_id column. Because each manager is also an employee, you relate these two columns by drawing a relationship line from the table to itself. This relationship ensures that each manager ID added to the table matches an existing employee ID.

Before you create a relationship, you must first define a primary key or UNIQUE constraint for your table. You then relate the primary key column to a matching column. Once you create the relationship, the matching column becomes a foreign key of the table.


Note When you run queries against a table, a reflexive relationship is called a self-join.


To create a reflexive relationship

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.