Lesson5.5.Understanding Relationship Types


Lesson 5.5. Understanding Relationship Types

Figure 5-11. The Edit Relationships dialog box indicates the type of relationship that exists between two tables.


When you link two tables together, they form one of three possible relationships, as shown in Figure 5-11. This information is rather technical, but it's good to know if you're working with related or linked tables. There isn't a step-by-step exercise in this lessonall you have to do is look over Table 5-1 to get a better understanding of table relationships.

Table 5-1. Types of Relationships

Relationship

Description

Each record in a table relates to one record in another table. This is the simplest type of relationship, but it doesn't occur very often because it's usually easier to store such information in one table instead of two.

Example: Each customer has one credit report.

Each record in a table relates to one or more records in another table. This is the most common type of relationship.

Example: Each customer has one or more invoices.

One or more records in a table relate to one or more records in another table. Many-to-many relationships are very confusing and thus aren't used very often. To create a many-to-many relationship, you usually need a third intermediate table that contains the primary keys from each of the two tables in the relationship. Such an intermediate table is called a junction table.

Example: Each sales representative sells several products, and each product is sold by several sales representatives.




CustomGuide Inc - Access 2003 Personal Trainer
Access 2003 Personal Trainer (Personal Trainer (OReilly))
ISBN: 0596009372
EAN: 2147483647
Year: 2005
Pages: 209

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