Using Multiple Tables
You saw earlier, in the example shown in Tables 3.6 to 3.9 in Chapter 3, how you can use several tables to remove duplication within a database. In this chapter you will use a simplified form of these tables to examine how multiple tables can be used within your database. In the Customer table example, you can see that problems begin to occur when you add two or more tables. For example, if you wanted to identify which orders belonged to a specific customer, you might create a second table holding all the order details. The problem is how to identify which orders belong to a specific customer; you could try using the customer’s company but there may well be several customers with similar if not the same company name. To overcome the problem you need to add a key or unique field to the Customers table, this could be used on the separate table containing the order details.
Unable to display preview. Download preview PDF.