Share this Page URL
Help

Chapter 2. The Basics of Database Design > Planning and Designing the HelloWorl... - Pg. 53

The Basics of Database Design 53 3. In the field list for the Employees table, click the EmployeeID field and drag it to the Employ- eeID field in the MarketingCampaigns table. (If the EmployeeID field isn't visible in the field list for the MarketingCampaigns table, drag the bottom border of the field list down to reveal it.) You'll see the Edit Relationships dialog box, shown here: The Edit Relationships dialog box shows the fields used to create the relationship between the tables and the type of relationship. The dialog box includes several other options that you'll learn about in Chapter 3, including an option to enforce referential integrity. When you create a relationship between tables, the fields that form the relationship don't have to have the same name, as in this case, but the fields must have the same data type unless the primary key field is an AutoNumber field. You can match a primary key field with the Au- toNumber data type to a foreign key field with the Number data type as long as the Field Size property for both of the fields is the same. Also, when you use two fields with the Number data type to create a relationship, the fields must have the same Field Size property. You'll learn more about the Field Size property for fields with the Number data type in Chapter 3.