There are three types of relationships in Access 2003:


There are three types of relationships in Access 2003:
·One-to-many. A one-to-many relationship, illustrated in Figure 1, is the most common type of relationship. In a one-to-many relationship, a record in Table A can have many matching records in Table B, but a record in Table B has only one matching record in Table A.
Figure 1. One-to-many relationship

·Many-to-many. In a many-to-many relationship, illustrated in Figure 2, a record in Table A can have many matching records in Table B, and a record in Table B can have many matching records in Table A. This type of relationship is only possible by defining a third table, called a junction table, whose primary key consists of two fields—the foreign keys from both Tables A and B. A many-to-many relationship is really two one-to-many relationships with a third table. For example, the Orders table and the Products table have a many-to-many relationship that’s defined by creating two one-to-many relationships to the Order Details table. One order can have many products, and each product can appear on many orders.
Figure 2. Many-to-many relationship

One-to-one. In a one-to-one relationship, illustrated in Figure 3, each record in Table A can have only one matching record in Table B, and each record in Table B can have only one matching record in Table A. This type of relationship is not common because most information related in this way would be in one table. You might use a one-to-one relationship to divide a table with many fields, to isolate part of a table for security reasons, or to store information that applies only to a subset of the main table. For example, you might want to create a table to track employees participating in a fundraiser soccer game. Each soccer player in the Soccer Players table has one matching record in the Employees table.
Figure 3. One-to-one relationship

Popular posts from this blog