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
1577
September 12, 2014 10:46PM
825
September 13, 2014 09:18PM
859
September 14, 2014 02:39AM
Re: Foreign Key problems
863
September 14, 2014 01:15PM
1127
September 14, 2014 07:40PM
888
September 14, 2014 09:37PM
887
September 14, 2014 11:07PM
938
September 15, 2014 07:26AM
1065
September 15, 2014 11:08AM
878
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.