Microsoft Office Tutorials and References
In Depth Information
Defining Table Relationships
3. Resize all the columns to their best fit, scrolling the table datasheet as necessary.
When finished, scroll back to display the first fields in the table. See Figure 2-37.
Customer table after importing data from the text ﬁ le
4. Save and close the Customer table, and then open the Navigation Pane.
The Belmont database now contains three tables—Contract, Customer, and Invoice—
and the tables contain all the necessary records. Your ﬁ nal task is to complete the
database design by deﬁ ning the necessary relationships between its tables.
Dei ning Table Relationships
One of the most powerful features of a relational database management system is its
ability to deﬁ ne relationships between tables. You use a common ﬁ eld to relate one table
to another. The process of relating tables is often called performing a join . When you
join tables that have a common ﬁ eld, you can extract data from them as if they were one
larger table. For example, you can join the Customer and Contract tables by using the
CustomerID ﬁ eld in both tables as the common ﬁ eld. Then you can use a query, form,
or report to extract selected data from each table, even though the data is contained in
two separate tables, as shown in Figure 2-38. In the CustomerContracts query shown
in Figure 2-38, the CustomerID, Company, First, and Last ﬁ elds are from the Customer
table, and the ContractNum and ContractAmt ﬁ elds are from the Contract table. The
joining of records is based on the common ﬁ eld of CustomerID. The Customer and Contract
tables have a type of relationship called a one-to-many relationship.