MySQL Forums
Forum List  »  InnoDB

Re: Foreign Key problems
Posted by: Peter Brawley
Date: September 14, 2014 01:15PM

> that just defeats the purpose?

Yep, for referential integrity you have two choices:

(i) implement foreign keys, or

(ii) implement equivalent code and with 100% certainty prevent changes to the affected tables that could bypass that code.

Usually ii is more difficult and performs worse than i.

Note that both alternatives require that you understand how the tables relate.

So let's see the Show Create Table statements for these tables.



Edited 1 time(s). Last edit at 09/14/2014 09:13PM by Peter Brawley.

Options: ReplyQuote


Subject
Views
Written By
Posted
1759
September 12, 2014 10:46PM
924
September 13, 2014 09:18PM
953
September 14, 2014 02:39AM
Re: Foreign Key problems
960
September 14, 2014 01:15PM
1222
September 14, 2014 07:40PM
973
September 14, 2014 09:37PM
975
September 14, 2014 11:07PM
1035
September 15, 2014 07:26AM
1176
September 15, 2014 11:08AM
962
September 15, 2014 03:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.