Tuesday, May 3, 2011

Table Relationships - VIII


Table relationships are the associations of data between tables.  By defining table relationships, you can pull records from related tables based on matching fields. 
One to One Relationships
One-to-One Relationship
A one-to-one relationship is between two tables where the primary key in one table and the foreign key in another table are the same.  For each record in the first table, there is a single matching record in the second table. 
One to One Relationships
One-to-Many Relationship
A one-to-many relationship occurs between two tables where the primary key in one table can be duplicated many times in another table
One to Many Relationships
Creating Table Relationships
To create relationships between tables:
  • Click the Database Tools tab on the Ribbon
  • Click the Relationships button
Relationships Button
  • Click on the Design tab
  • Click Show Table
Show Table Button
Select the desired tables
  • Click Add
  • Click Close
Show Table Dialog Box
  • Click the field you wish to create a relationship from
  • Drag it to the matching field in the other table
  • Click Create
Relationships Dialog Box
Print a Table Relationship
  • Click the Database Tools tab
  • Click the Relationships Button
  • Click the Relationship Report Button on the Design tab
Relationship Report Button 
  • Click the Print button
Print Relationship Report

No comments:

Post a Comment