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
From the course: Database Foundations: Data Structures
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
One-to-many relationships2m 13s
-
(Locked)
One-to-one relationships1m 27s
-
(Locked)
Many-to-many relationships2m 14s
-
(Locked)
Self-referencing relationships1m 56s
-
(Locked)
Cascade updates and deletes4m 35s
-
(Locked)
Challenge: Link tables with keys1m 8s
-
(Locked)
Solution: Link tables with keys6m 23s
-
(Locked)
-
-
-