From the course: Database Foundations: Data Structures

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Cascade updates and deletes

Cascade updates and deletes

From the course: Database Foundations: Data Structures

Start my 1-month free trial

Cascade updates and deletes

- [Instructor] When records in a table are modified, or deleted, it can have downstream effects on other tables that they're related to. Relational database management systems have features, that can cascade changes to affected tables in order to maintain the integrity of the relationship. Let's see how this works by returning to the two trees, customers, and orders table. I'm going to select everything out of both tables, to see what our starting position looks like. Right now, there's a foreign key relationship, between the customer ID columns in both of these tables. And this will protect the integrity of the relationship. I want to focus on the company called Wild Rose. They currently have a customer ID of WR421. This value is used to link to the one order that they've placed down at the orders table, and you can find it right there. Now, what happens if I try and edit that ID value in the customer's table. On line six…

Contents