Chapter 10. Creating Relational Databases


Creating relational databases is a multi-step process, which you begin by adding match fields (sometimes called key fields) to each set of source and destination files. The match fields enable you to take the second step of creating the relationship (or link), which simply acts as a pointer from the destination file to the source file. In the final step, you then define the relationship between the files by specifying what fields you actually want used in creating lookups and portals between them. Additionally, you can define relationships for specific layouts, which give your databases tremendous flexibility.

For example, in this chapter we create match fields in the source and destination files using identity numbers. The match fields then let us link different source and destination files. Each relationship includes only one destination file and one source file. But you can create multiple relationships because the same file can be the destination for some data and the source of other data. Whether you're dealing with a table, file, record, or field, the source is where the data comes from. In contrast, the destination is where the data goes to. For a bit of lingo help, see Table 10.1, Too Many Terms for Some Simple Ideas.

Table 10.1. Too Many Terms for Some Simple Ideas

FILEMAKER TERM

WHAT IT MEANS

destination file, table, record, or field current master target

The file, table, record, or field you copy data to

source file, table, record, or field related originating

The file, table, record, or field you copy data from

relationship link join expression

connection between tables or files, using match (or key) fields


The examples in this chapter are based on three database files: productsEG, which lists product descriptions and prices; customersEG, which lists all the contact information for each customer; and ordersEG, which uses information from both databases, plus its own information, to generate order lists and cost totals for those orders (Figure 10.1). To put all that information in a single database file would be unwieldy. By dividing it into three files, each database remains compact and simple to use, which is what relational databases are all about. As you read the rest of the chapter, refer back to Figure 10.1 to see how these three relational files put relationships, match fields, lookups, and portals to use. If you want to use these same databases to follow along, you'll find them at www.waywest.net/filemaker/.

Figure 10.1. How three related files connect: The ItemID# match fields link the files productsEG to ordersEG, allowing the Item Price and Item Description fields to be copied using lookup fields. The CustomerID# match fields link customersEG to ordersEG, making the multiple-record portal of customer information appear within ordersEG.




FileMaker Pro 8 for Windows and Macintosh(c) Visual Quickstart Guide
FileMaker Pro 8 for Windows & Macintosh
ISBN: 032139674X
EAN: 2147483647
Year: 2006
Pages: 184
Authors: Nolan Hester

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net