• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Creating Multitable and Cros... > Joining Tables to Create Multitable ...

Joining Tables to Create Multitable Queries

Before you can create joins between tables, you must know which fields are related by common values. As mentioned in Chapter 5, assigning identical names to primary-key and foreign-key fields in different tables that contain related data is a common practice. This approach, used by Microsoft when creating the Northwind sample database, makes determining relationships and creating joins among tables easier. The CustomerID field in the Customers table and the CustomerID field in the Orders table, for example, are used to join orders with customers. A join between tables requires that one field in each table have a common set of values—CustomerID codes for this example.

Figure 11.1 shows the structure of the Northwind.mdb database with a graphical display of the relationships between the tables. Access indicates relationships with lines between field names of different tables. Bold type indicates primary-key fields. Each relationship usually involves at least one primary-key field. Relationships define potential joins between tables, but it’s not necessary to have a predefined relationship to create a join.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint