-
Why Relate?
-
A Relational Database Tour
-
Linking Tables in the Relationships Window
-
Using Subdatasheets to View Related Items
-
Creating Subforms
It's time to learn the most powerful technology of all: the very heart of Access and most other modern database managers. So far, this book has dealt only with flat databases—those with only one table, or with several tables that aren't linked in any way. Each record in a flat database can hold bits of information (fields) about an individual item, and your forms, searches, and sorts are limited to shifting that information around in various ways. Flat databases are perfectly good for some purposes, as explained in the box on Section 4.1.
Ultimately, however, flat databases have a severe limitation: They can't understand how different masses of information are somehow related to each other the way you can. For example, a Customer database, if it has just that one table, can store information on thousands and thousands of customers and perform sorts and reports on it in seconds. Same thing with tables for Orders and Products. But say you have a nationwide business where you want to increase your sales by targeted marketing for each region of the country. You need the answer to a broader question like, "What do my customers on the West Coast purchase differently from my customers on the East Coast?" You can see the connection between your Customers' state of residence, the products they buy, and the total amounts ordered in each state, but you need your database to go through all those records and come up with the answer for you.
The problem is, you know the information is in there somewhere, but you have no idea how to tell your database to total up the orders (from the Orders table) for each product (in the Products table) and sort them by state (from the Customers table). Well, that's exactly what you'll learn how to do in this chapter. In Access, it's not hard at all to create the connections—known as