Skip to content

Commit

Permalink
Minor updates to foreign keys article
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-McBurney committed Oct 29, 2024
1 parent 66d1aa7 commit 795cbb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/data/_posts/2000-03-09-Foreign Keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,7 @@ But since StudentID 3 wouldn't exist anymore, this means that Enrollments is now

We would have to do a workaround by first deleting all the records associated with StudentID 3 in Enrollment **first**, and only **then** could we delete Students. `ON CASCADE DELETE` simply does this for us automatically by ensuring that when we delete Bob Quitsalot in Students, it deletes any records that **reference** that record via a foreign key in any other table.


## Next...

Now that we have multiple related tables, we can start doing summary data across multiple tables.

0 comments on commit 795cbb8

Please sign in to comment.