Relationship Tables in Microsoft Access
Relationship Tables in Microsoft Access
• Open the Microsoft Access database where you want to create relationships between
tables.
• Select Relationships from the Relationships group. This opens the Relationships
window, where you'll define how the tables interact.
• In the Relationships window, click the Show Table button (or right-click and select
"Show Table").
• From the list, select the tables you want to relate and click Add. Once added, close the
Show Table dialog box.
4. Create a Relationship
• Click and drag a field from one table to the corresponding field in the related table.
o For example, drag the CustomerID field from the Customers table to the
CustomerID field in the Orders table.
o Select the Enforce Referential Integrity checkbox if you want to ensure that
data remains consistent (e.g., you can't have an order without a valid customer).
o You can also enable Cascade Update or Cascade Delete if you want changes in
the parent table to automatically update or delete related records in the child
table.
• After creating relationships, you'll see lines connecting the related fields. These lines
represent the type of relationship (one-to-many, many-to-many, etc.).
• You can double-click the lines to edit or delete the relationship at any time.
Relationship Types:
• One-to-Many: One record in Table A can have many related records in Table B (e.g., a
customer can place many orders).
• Many-to-Many: Requires a junction table between the two tables (e.g., students and
classes where many students can attend many classes).
Class activity