This module discussed working with relationships within Access and using referential integrity. In this module, you learned how to:
Identify different types of relationships used in Access
Create one-to-one and one-to-many relationships
Create a many-to-many relationship
Use relationships to manage referential integrity
Set the Cascade Update and Cascade Delete options for relationships
Cascade Update and Cascade Delete effect Access Referential Integrity
Cascade Update and Cascade Delete are options in Access that determine what should happen to related records when a record in the primary table is updated or deleted. These options are used to enforce referential integrity, which is a concept that ensures that relationships between tables remain consistent.
When the Cascade Update option is selected, any related records in the foreign table will be automatically updated when the primary key value in the primary table is changed. This helps to ensure that the relationships between tables remain consistent.
When the Cascade Delete option is selected, any related records in the foreign table will be automatically deleted when the corresponding record in the primary table is deleted. This helps to prevent orphan records in the foreign table and ensures that relationships between tables remain consistent.
Overall, Cascade Update and Cascade Delete are useful tools in Access for enforcing referential integrity, as they help to maintain the consistency of relationships between tables.
Creating Relationships and enforcing Referential Integrity
The Relationships window lets you establish the relationships and referential integrity rules that you want to apply to the tables involved in a relationship. Creating a permanent, managed relationship that ensures referential integrity between Access tables is easy:
Select Database Tools . Relationships. The Relationships window appears.
Click the Show Table button on the Ribbon, or right-click the Relationships window and select Show Table from the shortcut menu. The Show Table dialog box (shown in Figure 2.7) appears.
Cascade Update - Delete - Quiz
You can take a quiz that will help you verify what you have learned and discover topics that you might want to review in a more detailed manner.
Click the Quiz link below to answer a few questions about working with relationships. Cascade Update - Delete - Quiz