The CASCADE option in a FOREIGN KEY constraint in DB2 performs ________.
- Updates or deletes a row in the parent table, and automatically updates or deletes related rows
- Updates or deletes a row in the child table, and automatically updates or deletes related rows
- Deletes all rows in the parent table, and automatically updates or deletes related rows
- Deletes all rows in the child table, and automatically updates or deletes related rows
The CASCADE option in a FOREIGN KEY constraint specifies that when a referenced row in the parent table is updated or deleted, the corresponding rows in the child table are automatically updated or deleted accordingly. This ensures data consistency between related tables by propagating changes in the parent table to the child table. This option helps in maintaining referential integrity in the database.
Loading...
Related Quiz
- Which DB2 feature helps to enforce data integrity by automatically updating related data?
- Scenario: A DBA needs to find the average salary of all employees in a department. Which aggregation function should they use in DB2, and why?
- How can denormalization lead to potential data inconsistency issues?
- What advantages does XML provide over JSON in DB2?
- What are some features of DB2 that enhance performance tuning?