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.
Figure 2-37
Customer table after importing data from the text fi 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 fi nal task is to complete the
database design by defi 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 defi ne relationships between tables. You use a common fi 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 fi 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 fi eld in both tables as the common fi 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 fi elds are from the Customer
table, and the ContractNum and ContractAmt fi elds are from the Contract table. The
joining of records is based on the common fi eld of CustomerID. The Customer and Contract
tables have a type of relationship called a one-to-many relationship.
 
Search JabSto ::




Custom Search