Tables   -   Relationships   


  Tables

    What is a table?

    Table design

    Field properties

    Inputting data

    Relationships

    Tutorial


 Queries

 Forms

 Reports

 Macros

 Modules
When multiple tables exist within a database, related information from table-to-table can be linked. That link is defined as a relationship. These relationships can also exist between tables-and-queries, as well as, queries-to-queries.

These relationships can be seen be selecting , the relationship icon . If there are already relationships present, a window like Table.3 - Relationship Window will appear.


If no relationships exist, the above window will appear except a dialog box will appear prompting you to select the tables or queries you would like to place in the window. After making your selections, you need to click the Add button and then the Close button. Your window will now have boxes that are representations of your selected tables and/or queries. Each box has a name and a list of the fields that they contain.

To create the relationships, simply drag one of the field names from one of the boxes and drop it on a field name within another box. A new dialog window will appear like the one see in Table.4 - Relationship Definition Window. This new window helps you to further define the relationship between the two selected boxes.

Relationships Definition Window

The two features that need to be illustrated here are the Enforce Referential Integrity checkbox and the Join Types button. When the Enforce Referential Integrity box is checked, the database will not allow any links for non-existing records from one table/query to the other table/query. The Join Types button will open another dialog window where you will select the type of relationship the two fields will have. The three join types are listed and described below.

Join Types
One-to-One Only includes fields that are equal from one table/query to the other table/query
One-to-Many Include all records from the first table/query and only include those in the second table/query that are equal
Many-to-One Include all records from the second table/query and only include those in the first table/query that are equal.

The clearer the definition that you develop within the relationship window, the more confident you will feel in the development of your queries, and consequently the integrity of your database.


Access is a copyright of Microsoft, Inc. No infringement of those rights is intended.
Questions or comments -- Contact the author
1