Creating Relationships Between Tables 813
- With Field1 selected, type Title, and press Enter.
- Click the Title field name. Then in the Properties group, in the Field Size box, click
255 to select it, type 50 , and press Enter. - Type the following information in the first record:
FirstName Karen
LastName Berg
Title Owner
The Employees table is now ready for you to start entering data.
The first record of the Employees table.
CLEAN UP Close the Employees table. Retain the MyTables database for use in the
last exercise.
Creating Relationships Between Tables.
In Access, a relationship is an association between common fields in two tables. You can
use this association to link the primary key field in one table to a field that contains the
same information in another table. The field in the other table is called the foreign key.
For example, if customer accounts are assigned to specific sales employees, you can
establish a relationship by linking the primary key EmployeeID field in the Employees
table with the foreign key EmployeeID field in the Customers table. Each customer
account is assigned to only one employee, but each employee can manage many
customer accounts, so this type of relationship—the most common—is known as
a one-to-many relationship.
Similarly, if every order is associated with a customer, you can establish a relationship
by linking the primary key CustomerID field in the Customers table and foreign key
CustomerID field in the Orders table. Each order is placed by only one customer, but
each customer can place many orders. So again, this is a one-to-many relationship.