Quantcast
Channel: Good explanation of cascade (ON DELETE/UPDATE) behavior - Database Administrators Stack Exchange
Browsing all 7 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Answer by Martin Thoma for Good explanation of cascade (ON DELETE/UPDATE)...

Just remember: Relational databases are all about consistency. They want to ensure the data is consistent all the time.If you have an Author table and a Book table, the Book table might have an...

View Article



Answer by msouth for Good explanation of cascade (ON DELETE/UPDATE) behavior

A simple mnemonic would beON DELETE of parent CASCADE [by deleting] hereThat tells you which deletes (deletes of the parent) get cascaded, where the ON DELETE CASCADE statement goes (on the child), and...

View Article

Answer by Evan Carroll for Good explanation of cascade (ON DELETE/UPDATE)...

SQL:2011 SpecThere are five options for ON DELETE and ON UPDATE that can apply to the FOREIGN KEY. These are called <referential actions>, directly from the SQL:2011 specON DELETE CASCADE: if a...

View Article

Answer by George Mogilevsky for Good explanation of cascade (ON...

well, perhaps we can rationalize the syntax. Let's take a Python example:class Parent(self): # define parent's fieldsclass Child(self): # define child's fields parent_pk_is_childs_foreign_key =...

View Article

Answer by ypercubeᵀᴹ for Good explanation of cascade (ON DELETE/UPDATE) behavior

If you like the Parent and Child terms and you feel they are easy to be remembered, you may like the translation of ON DELETE CASCADE to Leave No Orphans!Which means that when a Parent row is deleted...

View Article


Answer by Mike Sherrill 'Cat Recall' for Good explanation of cascade (ON...

For example, if I have two tables - Parent and Child - where Child records are owned by Parent records, which table needs the ON DELETE CASCADE?ON DELETE CASCADE is an optional clause in a foreign key...

View Article

Good explanation of cascade (ON DELETE/UPDATE) behavior

I don't design schemas everyday, but when I do, I try to setup cascade updates/deletes correctly to make administration easier. I understand how cascades work, but I can never remember which table is...

View Article
Browsing all 7 articles
Browse latest View live




Latest Images